-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathreadme.txt
44 lines (35 loc) · 1.08 KB
/
readme.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
=== YARPP WPGraphQL ===
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
Creates a relatedPosts field in Post type with wp-graphql.
== Description ==
Creates a relatedPosts field in Post type with wp-graphql. You must have installed wp-graphql and YARPP.
Example of the query:
```
{
post(id: 235912, idType: DATABASE_ID) {
title
relatedPosts(where: { limit: 1 }) {
nodes {
title
slug
}
}
}
}
```
== Installation ==
1. Install the plugin wp-graphql
1. Install the plugin yarpp (Yet Another Related Posts Plugin)
1. Configure them following their instructions.
1. Install this plugin
1. Activate the plugin through the 'Plugins' menu in WordPress
1. Use it with wp-graphql. The field "relatedPosts" will be available within the Post type in GraphQL schema.
== Screenshots ==
1. How to query for the title and slug of relatedPosts, limiting to show only one result. /assets/screenshot-1.png
== Changelog ==