This is a headless WordPress theme designed to be used in conjunction with a front-end framework like React, Vue, or Angular. The theme serves as a minimal WordPress backend, providing content via the WordPress REST API to be consumed by your front-end application.
- A WordPress installation (version 5.0 or higher)
- Basic knowledge of WordPress themes
- A front-end application ready to consume data from the WordPress REST API
-
Download the Theme:
- Clone or download the theme from the repository:
git clone https://github.com/CareProID/headless-wordpress-theme.git
- Alternatively, download the theme as a
.zipfile and extract it to your local machine.
- Clone or download the theme from the repository:
-
Upload the Theme:
- Log in to your WordPress admin panel.
- Navigate to
Appearance > Themes. - Click on
Add Newand thenUpload Theme. - Select the
.zipfile if you downloaded it, or upload the theme folder if you cloned the repository.
-
Activate the Theme:
- Once the theme is uploaded, click on
Activateto make it your active WordPress theme.
- Once the theme is uploaded, click on
-
Configure Permalinks:
- Navigate to
Settings > Permalinks. - Ensure you have a custom structure or post name option selected to make sure the REST API endpoints are correctly formatted.
- Navigate to
-
Setup API
a. REST API: Ensure that the WordPress REST API is enabled. It is enabled by default in WordPress 4.7 and later.
b. GraphQL: You can use WPGraphQL
-
Connect to Your Front-End Application:
a. WordPress REST API:
- Point your front-end application to your WordPress site's REST API endpoint, typically located at:
https://yourdomain.com/wp-json/wp/v2/- Start consuming content via the REST API.
b. WordPress GraphQL API:
- Point your front-end application to your WordPress site's GraphQL API endpoint, typically located at:
https://yourdomain.com/graphql-
And either you can customize your own endpoint by set in wordpress admin dashboard :
GraphQL on Sidebar > Settings > WPGraphQL General Settings > GraphQL Endpoint -
Start consuming content via the GraphQL API.
This project is licensed under the MIT License. You are free to use, modify, and distribute this theme as per the terms of the license.
For more information, see the LICENSE file.