Giter Site home page Giter Site logo

dafky2000 / wp-graphql-yoast-seo Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ashhitch/wp-graphql-yoast-seo

0.0 2.0 0.0 111 KB

This is an extension to the WPGraphQL plugin for Yoast SEO

License: GNU General Public License v3.0

PHP 100.00%

wp-graphql-yoast-seo's Introduction

WPGraphQl Yoast SEO Plugin

This is an extension to the WPGraphQL plugin (https://github.com/wp-graphql/wp-graphql) that returns Yoast SEO data.

Currently returning SEO data for pages, posts, custom post types, categories and custom taxonomies.

Using this plugin? I would love to see what you make with it. @ash_hitchcock

Quick Install

  1. Install & activate WPGraphQL
  2. Clone or download the zip of this repository into your WordPress plugin directory & activate the WP GraphQL Yoast SEO plugin

Composer

composer require ashhitch/wp-graphql-yoast-seo

Usage

To query for the Yoast Data as the seo object to your query:

{
  pages(first: 10) {
    edges {
      node {
        id
        title
        seo {
          title
          metaDesc
          focuskw
          metaKeywords
          metaRobotsNoindex
          metaRobotsNofollow
          opengraphTitle
          opengraphDescription
          opengraphImage {
            altText
            sourceUrl
            srcSet
          }
          twitterTitle
          twitterDescription
          twitterImage {
            altText
            sourceUrl
            srcSet
        }
        }
      }
    }
  }
}

V3 breaking change.

Image urls are now returned as mediaItem type.

This applies to twitterImage and opengraphImage

Notes

This can be used in production, however it is still under active development.

Support

Open an issue

wp-graphql-yoast-seo's People

Contributors

ashhitch avatar bradymwilliams avatar gregrickaby avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.