Giter Site home page Giter Site logo

wp-api-yoast-meta's People

Contributors

chazuk avatar dokicro avatar leup avatar phatsk avatar poliuk avatar tedyw avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

wp-api-yoast-meta's Issues

Open Graph title and twitter title not displaying correctly

I am trying to figure out how to get my open graph title and twitter title to display correctly from the WordPress API. Here is my api endpoint.

http://editors.befunky.com/wp-json/wp/v2/posts

Everything is under the yoast_meta array. I am running WordPress 5.1.1 and the lastest versions of the Yoast SEO and Yoast Meta plugins.

For some reason the og:title reads Designer - Call to Action Block | BeFunky Blog, rather than Post Title | Site Title. I have an identical local setup and it outputs the correct data.

Any thoughts on where I might start looking?

Social/OpenGraph meta not displayed in API

We recently forked to add support for this. The issue comes with OpenGraph data being configured on the backend, but not rendered under the yoast_meta data in the REST API.

I should have a PR for this shortly.

Not updating tag metadescription

Hi,

first thank you so much for this great plugin, really.
I'd like to ask you how could I solve the issue related to the update of the 'yoast_wpseo_metadesc' for tags.
if I create a post, your plugin successfully update the field 'yoast_wpseo_metadesc', but if I create a new tag, the tag get created, but the metadescription is not.

Could you please help to undestand why and how could I do it?
Here an example of my code:

    tag_post = {
        'name': 'my new tag''
        'description': '<p>This is the tag description</p>',
        'yoast_meta': {
            'yoast_wpseo_metadesc': 'THIS SHOULD BE THE METADESCRIPTION',
        } ,

    }
    r = requests.post(url + '/tags', headers=header, json=tag_post)

Just to let you know that looking at the endpoints in /wp-json/wp/v2/tags, your plugin added correctly the field 'yoast_wpseo_metadesc', but I cannot edit it using the POST method.

PS: I did not test the same approch with categories (/wp-json/wp/v2/categories), but maybe I guess that if it does not work with tags, maybe the same issue could be also while creating yoast metadescription for categories

thank you in advance

Plugin only returns fields that were overridden, not the Yoast defaults

I know that this plugin hasn't been tested with this version of WP, but I thought I'd post this in case you plan on updating. Yoast itself has vague plans to support the WP REST API themselves, but no timeline that I can see. Yoast/wordpress-seo#3061

  • WP version: 4.8.1
  • Yoast version: 5.4

What's happening

Yoast data is coming back empty for every field.

{
id: 141,
date: "2017-09-06T16:38:35",
date_gmt: "2017-09-06T16:38:35",
...
yoast: {
    focuskw: "",
    title: "",
    metadesc: "",
    linkdex: "",
    metakeywords: "",
    meta-robots-noindex: "",
    meta-robots-nofollow: "",
    meta-robots-adv: "",
    canonical: "",
    redirect: "",
    opengraph-title: "",
    opengraph-description: "",
    opengraph-image: "",
    twitter-title: "",
    twitter-description: "",
    twitter-image: ""
}
}

What's Expected

The Yoast fields should contain the values the plugin would normally add to the HEAD of the document.

<title>Test Page Stuff - name name</title>

<!-- This site is optimized with the Yoast SEO plugin v5.4 - https://yoast.com/wordpress/plugins/seo/ -->
<!-- Admin only notice: this page doesn't show a meta description because it doesn't have one, either write it for this page specifically or go into the SEO -> Titles menu and set up a template. -->
<meta name="robots" content="noindex,follow">
<link rel="canonical" href="http://vccw.dev/test-page-stuff/">
<meta property="og:locale" content="en_US">
<meta property="og:type" content="article">
<meta property="og:title" content="Test Page Stuff - name name">
<meta property="og:description" content="lakjfao;wueoc orjaocnugnzlosio;ohgrhoi">
<meta property="og:url" content="http://vccw.dev/test-page-stuff/">
<meta property="og:site_name" content="name name">
<meta property="article:publisher" content="https://www.facebook.com/namename/">
<meta name="twitter:card" content="summary">
<meta name="twitter:description" content="lakjfao;wueoc orjaocnugnzlosio;ohgrhoi">
<meta name="twitter:title" content="Test Page Stuff - name name">
<meta name="twitter:site" content="@namename">
<meta name="twitter:creator" content="@namename">
<script type="application/ld+json">{"@context":"http:\/\/schema.org","@type":"WebSite","@id":"#website","url":"http:\/\/vccw.dev\/","name":"name name","alternateName":"name name at the name Arcade in Norfolk, VA","potentialAction":{"@type":"SearchAction","target":"http:\/\/vccw.dev\/?s={search_term_string}","query-input":"required name=search_term_string"}}</script>
<script type="application/ld+json">{"@context":"http:\/\/schema.org","@type":"Organization","url":"http:\/\/vccw.dev\/test-page-stuff\/","sameAs":["https:\/\/www.facebook.com\/namename\/","https:\/\/www.instagram.com\/namename\/","https:\/\/twitter.com\/namename"],"@id":"#organization","name":"name name","logo":""}</script>
<!-- / Yoast SEO plugin. -->



</head>

If I override the defaults in the Yoast plugin on the page, then the new value shows up.

Cannot set yoast_wpseo fields in tags and categories

I am using wp-api-yoast-meta to post the following data to my.site/wp-json/wp/v2/tags.

data = {
    "name": "Tag name", 
    "description": "Tag description", 
    "slug": "tag-name", 
    "yoast": {
        "yoast_wpseo_title": "Not working yoast title", 
        "yoast_wpseo_metadesc": "Not working yoast description"
        }
}

While name, description, slug are created or updated yoast_wpseo_ fields are not.

Is my data structure wrong?

Yoas info in categories

Hello,

I've found you plugin really helpfull but I have no clue about wordpress. Do you think there's a way to return yoast info in categories from woocommerce?

Yoast Custom Categories

Hi,

I have everything working on this except custom post categories. Has anybody fixed this locally?

Thanks

Works for Woocommerce product categories?

Hello,

I need to add those rest fields to woocommerce product category, so I added this code ๐Ÿ‘

// Product cat
register_rest_field( 'product_cat',
'yoast_meta',
array(
'get_callback' => array( $this, 'wp_api_encode_yoast_tag' ),
'update_callback' => null,
'schema' => null,
)
);

In the add_yoast_data function but it did not work, I can't fill those fields from the rest API (it works with posts, pages..)

Did I miss something ?

Thanks

Show and allow post about primary category

Hi,
I try to find a way to use the REST API to create new post and fill up the fields that let define a primary category.
yoast_wpseo_primary

Can i do this with your plugin ?
if not, any idea how i could do this ?

Thanks a lot

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.