Skip to content

chore: Update scaffold project#34

Merged
colinmurphy merged 25 commits into
mainfrom
chore-update-scaffold-project
Jun 3, 2025
Merged

chore: Update scaffold project#34
colinmurphy merged 25 commits into
mainfrom
chore-update-scaffold-project

Conversation

@colinmurphy

@colinmurphy colinmurphy commented May 13, 2025

Copy link
Copy Markdown
Member

Goal

To update the scaffold templates with best practices and better resources to meet developers where they are at and give them a better start when beginning headless WordPress

Overview of changes

  • README

  • Multiple Queries

  • Updated links

  • Added category link to the header

  • Added links to the front page

  • Allowed faustexample.wpengine.com for images

  • Refactored archive page

    • Post list to get more than the title and link
    • Created a post link component
    • Queried the first 5 blog posts
    • Load more to query the next 5 blog posts client side
  • Added copyright to the footer

  • Setup prettier and linting

  • Added footer menu with links

  • Update README with structure of the project

  • Screenshots for the README

  • File Structure for the README

@colinmurphy colinmurphy marked this pull request as ready for review May 16, 2025 19:13
@colinmurphy colinmurphy requested a review from a team as a code owner May 16, 2025 19:13
theodesp
theodesp previously approved these changes May 19, 2025
@colinmurphy

Copy link
Copy Markdown
Member Author

@moonmeister

Added those changes to the docs so its ready for re-review. Thanks for the suggestion ❤️

Screenshot 2025-05-19 at 19 24 53

Comment thread README.md Outdated
Comment thread package-lock.json Outdated
Comment thread possibleTypes.json
Comment thread wp-templates/archive.js Outdated
Comment thread wp-templates/front-page.js Outdated
return <>Loading...</>;
}

const siteDataQuery = useFaustQuery(SITE_DATA_QUERY) || {};

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here

Comment thread wp-templates/page.js Outdated
Comment thread wp-templates/single.js
Comment thread README.md Outdated
Comment thread wp-templates/archive.js Outdated
Comment thread next.config.js
@ahuseyn

ahuseyn commented May 20, 2025

Copy link
Copy Markdown
Member

@colinmurphy also try this:

  1. On dev mode go to the url: http://localhost:3000/example/
  2. Then from the header menu go to "Sample page"

You'll see this error:
Screenshot 2025-05-20 at 14 18 35

colinmurphy and others added 3 commits May 20, 2025 13:35
Co-authored-by: Huseyn Aghayev <husen.agaev@gmail.com>
Co-authored-by: Huseyn Aghayev <husen.agaev@gmail.com>
Co-authored-by: Huseyn Aghayev <husen.agaev@gmail.com>
@colinmurphy

Copy link
Copy Markdown
Member Author

Thanks @moonmeister and @ahuseyn for some really good feedback.

@ahuseyn I can replicate the same issue so will try and fix this too 👍

I will let ye know once this is ready for review.

@colinmurphy

Copy link
Copy Markdown
Member Author

@moonmeister @ahuseyn This is ready for re-review. Thanks again for all the feedback on the PR ❤️

@ahuseyn ahuseyn left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just added suggested changes for the Readme headings, sorry couldn't batch those into one commit

Comment thread README.md Outdated
Comment thread README.md Outdated
Comment thread README.md
Comment thread README.md
Comment thread README.md Outdated
Comment thread README.md
Comment thread README.md Outdated
Comment thread README.md Outdated
Comment thread README.md Outdated
@ahuseyn

ahuseyn commented May 22, 2025

Copy link
Copy Markdown
Member

@colinmurphy I've added some suggestions to the TS scaffold, which could be applied here too.

colinmurphy and others added 6 commits May 22, 2025 13:19
Co-authored-by: Huseyn Aghayev <husen.agaev@gmail.com>
Co-authored-by: Huseyn Aghayev <husen.agaev@gmail.com>
Co-authored-by: Huseyn Aghayev <husen.agaev@gmail.com>
Co-authored-by: Huseyn Aghayev <husen.agaev@gmail.com>
Co-authored-by: Huseyn Aghayev <husen.agaev@gmail.com>
Co-authored-by: Huseyn Aghayev <husen.agaev@gmail.com>
@colinmurphy

Copy link
Copy Markdown
Member Author

Thanks @ahuseyn

I have committed those suggestions and I will apply those to the other PR too so this is ready for another review :)

Thanks again for reviewing this ❤️

@colinmurphy colinmurphy requested a review from ahuseyn May 23, 2025 14:59
@colinmurphy colinmurphy merged commit c180598 into main Jun 3, 2025
3 checks passed
@colinmurphy colinmurphy deleted the chore-update-scaffold-project branch June 3, 2025 09:24
pjdavila pushed a commit to pjdavila/wp-headless that referenced this pull request Apr 13, 2026
WordPress categories were reorganized with a parent "News" category.
All existing categories are now children of News, URIs changed to
include /news/, "Crypto" was added, "Marketing" removed (no posts).

Changes made:

1. queries/MenuQueries.js:
   - Added parentId and children { nodes { name slug uri } } to
     categories query for hierarchy support

2. components/Header.js:
   - Added buildNavItems() to construct hierarchical nav from flat
     categories (separates top-level from children)
   - Desktop nav: "News" shows as dropdown with hover-activated submenu
     listing all child categories (Business, Crypto, Economy, etc.)
   - Mobile drawer: "News" renders as expandable accordion with toggle
     button and indented subcategory links
   - Added ChevronIcon component for dropdown indicators
   - Updated Header.fragments to include parentId and children

3. styles/header.module.css:
   - Added .navItem (relative positioning for submenu)
   - Added .navSubmenu (absolutely-positioned dropdown panel)
   - Added .navSubmenuLink styles
   - Added hover-triggered show/hide for desktop submenu
   - Added .drawerGroup, .drawerGroupToggle, .drawerSublinks,
     .drawerSublink for mobile accordion
   - Added .chevron and .chevronOpen for rotation animation

4. wp-templates/front-page.js:
   - Updated all CATEGORY_MAP URIs with /news/ prefix
   - Replaced marketing query/key with crypto
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants