wp-solidus
A headless WordPress theme for use with the WordPress JSON API and Solidus.
Presentation and everything else you'd normally expect in a WordPress theme has been stripped out. This theme has the following features;
To install and activate this theme with WP-CLI
use the theme command on your WordPress server;
wp theme install https://github.com/solidusjs/wp-solidus/archive/v1.0.0.zip --activate
Change the version number in the URL to match the version number you want to install and activate.
If you prefer to install using the WordPress GUI, download the ZIP of the latest release and install it using the WordPress Admin.
Usage of this theme requires the WP REST API, which makes content available in JSON format at examplewordpressdomain.com/wp-json/posts
. Solidus sites use a fork of the WP REST API plugin which enables Solidus-related features. WordPress version 4.5 and greater includes the WP REST API, but you need to install the fork for use with Solidus sites.
When this theme is enabled, the site is not visible on the front end. Instead, pages are redirected to Solidus.
Post preview links redirect to the corresponding page on the Solidus site. The redirects allow content editors to see updates on the Solidus site before they have been published.
Aside from preview links, other redirects exist but are not extensive. When there's no corresponding Solidus page, redirects take the user either to the Solidus site's home page or 404 page. Consider the WordPress URL to be wrong. Don't share the original WordPress URLs to posts, share the Solidus URL instead.
This theme overrides the content width global variable because it causes problems with image size settings.
This theme modifies the admin menu removing links to the Dashboard, Comments, Themes, Tools and Feedback, and adding a link the WP REST API documentation. The removed pages are accessible via their URL. For example; use /wp-admin/themes.php
to access theme settings.
This theme has support turned on for Post Thumbnails, and image, quote, link, chat, audio and video Post Formats. Category and tag taxonomies are turned on for media attachments.
This theme enables markdown support for post excerpts, which parses markdown and returns HTML markup in the API response. In order for markdown support to work, Jetpack must be installed and activated.
If the Types plugin is installed, any custom fields created by the Types plugin or added to Types' control are added to the API response at post.types_custom_meta.field_name
.
If you have problems or need support, open an issue. If you want to contribute or make changes, you are welcome to open a pull request.