postedin / yarpp-wpgraphql
Creates a relatedPosts field in Post type with wp-graphql. You must have installed wp-graphql and YARPP.
Installs: 278
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 4
Type:wordpress-plugin
Requires
- php: >=5.3.2
README
- Tags: wpgrahql, yarpp, related-posts
- Requires at least: 5.1
- Tested up to: 5.6.2
- Requires PHP: 7.2
- Stable tag: 0.0.1
- License: GPLv2 or later
- License URI: http://www.gnu.org/licenses/gpl-2.0.html
Description
Creates a relatedPosts field in Post type with wp-graphql. You must have installed wp-graphql and YARPP.
Installation
- Install the plugin wp-graphql
- Install the plugin yarpp (Yet Another Related Posts Plugin)
- Configure them following their instructions.
- Install this plugin
- Activate the plugin through the 'Plugins' menu in WordPress
- Use it with wp-graphql. The field "relatedPosts" will be available within the Post type in GraphQL schema.
Example
{ post(id: 235912, idType: DATABASE_ID) { title relatedPosts(where: { limit: 1 }) { nodes { title slug } } } }