• Resolved meideserve

    (@meideserve)


    I am using wordpress and Yoast SEO. I also utilize the Yoast How-To block for blog posts.

    I use this for many posts and pages!

    However I face a problem because Google Search Console is penalizing my site, for “duplicate fields of ‘How to’ “. An example is as above:
    https://meide.sg/toilet-bowl-cleaning/

    The reason is that even though I use the Yoast How To block – it does not allow for me to key in my Equipment and Supplies into the block, which is an important feature of the JSON LD.

    I thus use another plugin called Shortcoder, to manually insert my JSON LD code to the blog post, to indicate the Howto Tools and Howto Equipment. You can see that it ends up that there are two JSON LD codes, in the Console/Inspect/View Source of that website.

    How can I overcome this problem???

    I can only think of these:

    1. Can I be allowed to insert Equipment or Tools into Yoast How-to Block… need to have this added functionality… because it is very important and i believe Yoast is a respected, widely used, and excellent plugin.

    2. If not, it all else fails, can I disable the Yoast plugin from inserting the JSON LD code into my website code <head> section? I can then manually add in using my other plugin, to avoid the problem of having duplicate Howto JSON LD. However, I do not want to entirely disable the YOAST PLUGIN as I need the other functions. I just want to disable it from auto inserting the JSON LD code.

    Thank you!

    The page I need help with: [log in to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Support devnihil

    (@devnihil)

    @meideserve Initially the most simple answer to this would be not have a list of items as a ‘How To’ list, because at a very basic level it doesn’t qualify as a How To list. Why are you including the lists of tools as it’s own How To list when this could simply be an unordered list of items?

    Thread Starter meideserve

    (@meideserve)

    Hi Devnihil, thanks for your quick reply.

    What do you mean “”?

    If you do a simple Google Search on JSON LD, and How-to attributes, it is essential to have the list of tools. You can see directly from Google itself:

    >> https://developers.google.com/search/docs/data-types/how-to

    You can see a code snippet:

    "supply": [
            {
              "@type": "HowToSupply",
              "name": "tiles"
            }, {
              "@type": "HowToSupply",
              "name": "thin-set mortar"
            }, {
              "@type": "HowToSupply",
              "name": "tile grout"
            }, {
              "@type": "HowToSupply",
              "name": "grout sealer"
            }
          ],
          "tool": [
            {
              "@type": "HowToTool",
              "name": "notched trowel"
            }, {
              "@type": "HowToTool",
              "name": "bucket"
            },{
              "@type": "HowToTool",
              "name": "large sponge"
            }

    In comparison, the code generated by Yoast SEO pales in comparison. Sadly….

    Clearly, you need EQUIPMENT and SUPPLIES! By common sense, if you are creating step by step guide on how to do something, of course you will need the logistics, which could be tools, equipment or supplies, right?

    Please help, as per my previous question… Thank you.

    • This reply was modified 3 years, 8 months ago by meideserve.
    Plugin Support Michael Ti?a

    (@mikes41720)

    Hi,

    Upon checking your URL https://meide.sg/toilet-bowl-cleaning/ in Google’s Structured Data Testing Tool, there is indeed a ‘Duplicate field HowTo is not allowed’ error that is appearing.

    We understand you are using another plugin to add the relevant JSON-LD schema data. We do have documentation on our developer blog for integration guidelines with the Yoast SEO schema data output, so that there aren’t any errors and to make sure the code is compatible — https://developer.yoast.com/features/schema/integration-guidelines

    Do you mean you are also trying to address the ‘supply’ and ‘tool’ warnings being reported from the structured data testing tool?

    Thread Starter meideserve

    (@meideserve)

    Hi Michael Tina, thanks for your reply. Well, yes I am trying to address the ‘supply’ and ‘tool’ warnings being reported from the structured data testing tool. However, that said, as I mentioned before, isn’t it better if Yoast SEO plugin and functions allow us to add that in at the WordPress Post Block directly? This is something critical and severely missing from Yoast.

    The link u sent me on developer schema and integration guidelines seems useful, but is quite flooded with other non relevant info… I hope you can just help me to specify what is the exact PHP / JS code I can input into my functions.php so that I can integrate both JSON LD codes. I only use 2 plugins for this, which is Shortcoder and Yoast SEO, as I mentioned earlier.

    The code in shortcoder is basically JSON LD code that I manually type in myself.

    Plugin Support Suwash

    (@suascat_wp)

    @meideserve Regarding “supply” and “tools” schema properties, we thank you for suggesting a new feature for one of our plugins! You are actually not the first to have requested this feature! That means a feature request is already created and is currently under review?by our product team.

    What’s next?
    Our product team will assess feature requests in relation to other open bug reports and new features. Based on their assessment, the feature request will be given a priority level. Our developers work on the highest priority first. Unfortunately, this means we cannot give you an estimate if or when they’ll start working on your request.

    Duplicate field HowTo is not allowed

    We might be wishing to remove HowTo schema piece outputted by Yoast SEO. We recommend reviewing this guide here https://developer.yoast.com/features/schema/api. Depending on what you are trying to accomplish there is a section which highlights how to: To add or remove graph pieces. You may need to refer to that section to get an idea about how to remove schema graph pieces. For example wpseo_schema_graph_pieces filter lets you remove certain schema piece. You may also need to see the section: Change a graph pieces’ data which discusses how to change data on specific pages.

    Additionally, there’s a difference between the support we can offer and the level of programming needed to change (core) features of our plugin. Since we don’t want to take the risk that we break your website by suggesting incorrect or incomplete code, we cannot advise you on how to make such changes. And even though we cannot be of any assistance, you’re completely free to change anything in the plugin to better suit your needs.

    If needed, we highly recommend checking out the Yoast supported partners here: https://yoast.com/yoast-partners/.

    Thread Starter meideserve

    (@meideserve)

    Anyway, I’ve looked at the code, and what I did was:

    1. copy and paste all the JSON LD that was generated by Yoast Schema, into my Shortcoder JSON LD.
    2. Disable Howto Schema Graph Piece by pasting this code into functions.php:

    
     add_filter( 'wpseo_schema_graph_pieces', 'remove_howto_from_schema', 11, 2 );
    function remove_howto_from_schema( $pieces, $context ) {
        return \array_filter( $pieces, function( $piece ) {
            return ! $piece instanceof \Yoast\WP\SEO\Generators\Schema\Howto;
        } );
    }
    

    Now, no duplicates, as the HowTo JSON LD is purely input via my Shortcoder plugin, albeit in the <body>.

    Hope this helps anyone else facing this problem.

    Appreciate your support, Yoast, but would really be great if you could have provided the code. Of course it might break website… as always… So it is ultimately our user duty to be responsible for that, not the plugin support.

    Plugin Support Suwash

    (@suascat_wp)

    @meideserve We appreciate your feedback in this context and we are glad to know the issue has been finally resolved. We will definitely work forward to improvising our developer guide more and other resources so we could address similar concerns in less effort and time.

    Have a nice day!!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Duplicate Field’ is closed to new replies.