WP Manifestindependent plugin directory
manifest / integrations / wp-graphql-get-extended

WP GraphQL Get Extended

Adds a WP GraphQL field that replicate get_extended() function behavior.

by Armand Philippot · github.com/armandphilippot/wp-graphql-get-extended · website

1stars
0forks

Install

No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:

wp plugin install https://github.com/armandphilippot/wp-graphql-get-extended/archive/refs/heads/main.zip

Readme

WP GraphQL Extended

Adds a WP GraphQL field that replicate get_extended() function behavior. It allows you to obtain the content before/after the more tag.

Requirements

Description

By default, the get_extended() function from WordPress is not implemented in WP GraphQL. I'm used to use it, so I decided to create this feature.

If you don't know get_extended, you can read more information in WordPress documentation. It allows you to split your content into two parts: the one before the more tag and the one after.

This plugin allows you to retrieve this two parts for each posts including Custom Post Types. You can also choose the output format: raw or rendered.

Query example:

query SinglePost($slug: String!) {
    postBy(slug: $slug) {
        contentParts {
            beforeMore(format: RAW)
            afterMore
        }
    }
}

Note: If your post does not contain a more tag, the beforeMore part contains your post and the afterMore part is empty.

Installation

Download this repo, then put the plugin inside your wp-content/plugins/ directory and activate it in your WordPress admin.

License

This WordPress plugin is open-source and available under the GPL-v2-or-later license.

Read the full README on GitHub →

Releases

TagPublished
v1.0.2 Mar 2, 2022
v1.0.0 Dec 7, 2021

These releases are tags only. The author does not attach a packaged zip, so there are no download counts to report.