Skip to content

Latest commit

 

History

History

examples

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

HWP Toolkit Examples

This directory contains examples demonstrating how to use various features of the Headless WordPress Toolkit.

Feature Highlight: Most examples include a wp-env setup, allowing you to fully configure your headless application with a single command. They also contain screenshots of the application.

Astro Example

Title Description
template-hierarchy-data-fetching-urql Demonstrates template hierarchy and data fetching with Astro, URQL, and Headless WordPress.

Next.js Examples

Title Description
apollo-authentication Showcases authentication with Next.js, Apollo Client, and Headless WordPress.
apollo-client-data-fetch Explores data fetching strategies and state management using Next.js, Apollo Client, and Headless WordPress.
apollo-client-filesystem-routing Integrates WPGraphQL and WPGraphQL for ACF with Next.js for a headless WordPress site.
client-app-router-fetch-data Uses Next.js App Router and fetch API to retrieve data from WordPress via WPGraphQL.
client-multisite-app-router-fetch-data Implements a multisite headless WordPress app with Next.js App Router and fetch API.
custom-sitemap-apollo Generates a custom sitemap using Next.js, Apollo Client, and WPGraphQL with an extended plugin.
custom-sitemap-vanilla-wpgraphql Creates a custom sitemap using Next.js and WPGraphQL without extending its endpoints.
hybrid-sitemap-apollo Fetches and transforms WordPress sitemaps for clean URL formatting with Next.js.
proxied-sitemap-apollo Provides a proxied sitemap by transforming WordPress XML sitemaps for SEO-friendly frontend URLs.
render-blocks-pages-router Renders WordPress Blocks with JSX in Next.js, including utilities for hierarchical block data.

Contributing

If you feel like something is missing or you want to add an example for another framework, we encourage you to contribute! Please check out our Contributing Guide for more details.

Screenshots

Feature Highlight: Here are some sample screenshots of the examples listed above.

Apollo Authentication

View Screenshots

Enable Credentials Authentication

Logged In View

Login Screen

Apollo Client Data Fetch

View Screenshots

Homepage View Live Search Feature Load More Button New Comment Form Post with Comments Static Page Example

Apollo Client Filesystem Routing

View Screenshots

Categories View Category Page Homepage View Posts Overview Single CPT Example Single Post View

Client App Router Fetch Data

View Screenshots

Blog Comment Form Submitted Blog Comment Form Blog Comments Blog Listing Pagination Blog Listing Blog Single CPT Event Listing CPT Event Single

Client Multisite App Router Fetch Data

View Screenshots

Blog Listing Pagination Blog Listing Catch All Second Site Catch All Comment Form Comments CPT Single CPT Home Single Blog

Custom Sitemap Apollo

View Screenshots

Sitemap Category Sitemap CPT Sitemap CTT Sitemap Index Sitemap Page Sitemap Post Sitemap Tag Sitemap User

Custom Sitemap Vanilla WPGraphQL

View Screenshots

Sitemap Category

Sitemap CPT

Sitemap Index

Sitemap Page

Sitemap Post

Sitemap Tag