{"id":15505674,"url":"https://github.com/imranhsayed/headless-cms","last_synced_at":"2025-04-04T18:08:57.287Z","repository":{"id":40557085,"uuid":"258616786","full_name":"imranhsayed/headless-cms","owner":"imranhsayed","description":"❤️ A WordPress plugin that adds features to use WordPress as a headless CMS with any front-end environment using REST API","archived":false,"fork":false,"pushed_at":"2024-08-29T04:23:51.000Z","size":3703,"stargazers_count":210,"open_issues_count":13,"forks_count":31,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-03-28T17:06:36.642Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://codeytek.com","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/imranhsayed.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-04-24T20:26:44.000Z","updated_at":"2025-03-23T18:02:57.000Z","dependencies_parsed_at":"2023-02-12T08:00:57.397Z","dependency_job_id":"d7a1ab5c-025c-49eb-a3f4-3b2b148ea4ef","html_url":"https://github.com/imranhsayed/headless-cms","commit_stats":{"total_commits":119,"total_committers":3,"mean_commits":"39.666666666666664","dds":0.2184873949579832,"last_synced_commit":"d60eb14c1c0adfa84b7dbbbf182875d1c8877d54"},"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imranhsayed%2Fheadless-cms","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imranhsayed%2Fheadless-cms/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imranhsayed%2Fheadless-cms/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imranhsayed%2Fheadless-cms/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/imranhsayed","download_url":"https://codeload.github.com/imranhsayed/headless-cms/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247226215,"owners_count":20904465,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-02T09:24:12.426Z","updated_at":"2025-04-04T18:08:57.253Z","avatar_url":"https://github.com/imranhsayed.png","language":"PHP","readme":"# Headless CMS\n\n[![Project Status: Active.](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active)\n\n\nA WordPress plugin that adds features to use WordPress as a headless CMS with any front-end environment using REST API.\nThis plugin provides multiple features and you can use the one's that are relevant to your front-end application.\nYou don't necessarily need to use all.\n\n\n\u003ca href=\"https://youtu.be/nYXL1KKjKrc\" target=\"_blank\"\u003e\n\u003cimg src=\"https://codeytek.com/wp-content/uploads/2020/07/banner-1544x500-1.png\" alt=\"Headless CMS WordPress Plugin\" /\u003e\n\u003c/a\u003e\n\n## Install via Composer\n\n```shell script\ncomposer require imranhsayed/headless-cms\n```\n\n- [https://packagist.org/packages/imranhsayed/headless-cms](https://packagist.org/packages/imranhsayed/headless-cms)\n\n\n## Maintainer\n\n| Name                                                   | Github Username |\n|--------------------------------------------------------|-----------------|\n| [Imran Sayed](mailto:codeytek.academy@gmail.com)       |  @imranhsayed   |\n\n## Assets\n\nAssets folder contains webpack setup and can be used for creating blocks or adding any other custom scripts like javascript for admin.\n\n- Run `npm i` from `assets` folder to install required npm packages.\n- Use `npm run dev` during development for assets.\n- Use `npm run prod` for production.\n- Use `npm run eslint:fix js/fileName.js` for fixing and linting eslint errors and warning.\n\n# REST API ENDPOINT\n\n\u003e This plugin provides you different endpoints using WordPress REST API.\n\n## Getting Started :clipboard:\n\nThese instructions will get you a copy of the project up and running on your local machine for development purposes.\n\n## Prerequisites :door:\n\nYou need to have any WordPress theme activated on your WordPress project, which has REST API enabled.\n\n## Installation :wrench:\n\n1. Clone the plugin directory in the `/wp-content/plugins/` directory, or install a zipped directory of this plugin through the [WordPress plugins](https://wordpress.org/plugins/headless-cms/) screen directly.\n2. Activate the plugin through the 'Plugins' screen in WordPress\n\n## Example Frontend applications\n\nExample of front-end applications where this plugin can be used:\n\n1. [Gatsby WordPress Theme](https://github.com/imranhsayed/gatsby-wordpress-themes)\n2. [React Wordpress Theme](https://github.com/imranhsayed/react-wordpress-theme)\n\n## Features\n\n1. Custom REST API Endpoints.\n2. Social links in customizer.\n3. Image uploads for categories.\n4. Custom header and footer menus.\n5. Custom Widgets.\n6. Custom Header and Footer GraphQL fields when using [wp-graphql](https://github.com/wp-graphql/wp-graphql) plugin\n7. Adds coAuthors data in the GraphQL Api.\n\n* Adds option to add social links in customizer\n* Registers two custom menus for header ( menu location = hcms-menu-header ) and for footer ( menu location = hcms-menu-footer )\n* Registers the following sidebars\n\n1. HCMS Footer #1 with sidebar id 'hcms-sidebar-1'\n\n![](assets/images/screenshot-4.png)\n\n2. HCMS Footer #2 with sidebar id 'hcms-sidebar-2'\n\n![](assets/images/screenshot-5.png)\n\n* Adds frontend preview link option in the editor.\nFor Preview to work , you also need the [wp-graphql-jwt-authentication](https://github.com/wp-graphql/wp-graphql-jwt-authentication) plugin as well\n\n### More Features\n1. Registers the sections for socials icons in the customizer\n\n* Social icons urls for 'facebook', 'twitter', 'instagram', 'youtube'\n\n![](assets/images/screenshot-6.png)\n\n2. Image upload features for categories\n\n* Provides Image upload features for categories.\n\n![](assets/images/screenshot-3.png)\n\n3. Plugin Settings Page\n\n* Settings for getting data for a custom page like Hero section, Search section, Featured post section, latest posts heading.\n\n* Registers custom end points\n\n4. Following fields when using [wp-graphql](https://github.com/wp-graphql/wp-graphql) plugin.\n\n* Custom Header and Footer GraphQL\n![](assets/images/screenshot-2.png)\n\n* WooCommerce Countries and States\n\n```javascript\n{\n  wooCountries {\n    billingCountries {\n      countryCode\n      countryName\n    }\n    shippingCountries {\n      countryCode\n      countryName\n    }\n  }\n  wooStates(countryCode: \"in\") {\n    states {\n      stateCode\n      stateName\n    }\n  }\n}\n```\n\n* WooCommerce Shipping Zones.\n\n```javascript\n{\n  shippingInfo {\n    shippingZones\n    storePostCode\n  }\n}\n```\n\n* Add Product to Wishlist Mutation ( Authenticated request )\n\n```javascript\nmutation ADD_ITEM {\n  addToWishlist(input: {clientMutationId: \"example\", productId: 340}) {\n    clientMutationId\n    error\n    added\n    productId\n    wishlistProductIds\n  }\n}\n```\n\n* Remove Product from Wishlist Mutation( Authenticated request )\n\n```javascript\nmutation REMOVE_ITEM{\n  removeFromWishlist(input: {clientMutationId: \"example\", productId: 340}) {\n    error\n    productId\n    removed\n    wishlistProductIds\n  }\n}\n```\n\n* Get Products from Wishlist Mutation ( Authenticated request )\n```javascript\nquery GET_WISHLIST {\n  getWishList {\n    productIds\n    error\n    products {\n      databaseId\n      name\n      slug\n      buttonText\n      image {\n        alt\n        src\n        attachmentId\n      }\n      priceHtml\n      productUrl\n      stockQuantity\n      stockStatus\n      typename\n    }\n  }\n}\n```\n\n* Schema Details\n\n```javascript\n  posts {\n    nodes {\n      seo {\n        schemaDetails\n      }\n    }\n  }\n```\n\n## Available Endpoints:\n\n### Get single post ( GET request )\n* `http://example.com/wp-json/rae/v1/post?post_id=1`\n\n### Get posts by page no: ( GET Request )\n* `http://example.com/wp-json/rae/v1/posts?page_no=1`\n\n### Get header and footer date: ( GET Request )\n* Get the header data ( site title, site description , site logo URL, menu items ) and footer data ( footer menu items, social icons )\n* `http://example.com/wp-json/rae/v1/header-footer?header_location_id=hcms-menu-header\u0026footer_location_id=hcms-menu-footer`\n\n## Get WooCommerce Country and states ( GET Request )\n- `/wp-json/rae/v1/wc/countries/`\n- `/wp-json/rae/v1/wc/states?countryCode=IN`\n\n## Contributing :busts_in_silhouette:\n\nPlease read [CONTRIBUTING.md](https://gist.github.com/PurpleBooth/b24679402957c63ec426) for details on our code of conduct, and the process for submitting pull requests to us.\n\n## Versioning\n\nI use [Git](https://github.com/) for versioning. \n\n## Author :pencil:\n\n* **[Imran Sayed](https://codeytek.com)**\n\n## License :scroll:\n\n![License: GPL v2](https://img.shields.io/badge/License-GPL%20v2-blue.svg)\n\n- **[GPLv2](https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html)**\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimranhsayed%2Fheadless-cms","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fimranhsayed%2Fheadless-cms","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimranhsayed%2Fheadless-cms/lists"}