• Resolved cinnamonlou

    (@cinnamonlou)


    Hello! I am seeing this error in GSC for all of my blog posts – Missing field “itemListElement”. I am using Yoast Breadcrumbs and I have read several of the other posts on this topic but they don’t seem to have the answer to my situation.

    I have added a code snippet to display the “Blog” page in each blog post breadcrumb. Perhaps that is causing problems? I couldn’t figure out a way to use the Yoast settings to accomplish this goal, and I do not want to use the default WordPress settings to designate the “Posts” page.

    I appreciate any help you can offer!

    /*
    Custom breadcrumb paths using Yoast SEO to fix care plan breadcrumb paths. From this article:
    https://www.mrkwp.com/2023/06/edit-yoast-breadcrumb-php/
    @param [array] $links default param.
    @return [array] $links edited links path.
    */
    
    function fix_blog_bc_path( $links ) { global $post; if ( is_singular( 'post' ) || is_post_type_archive( 'post' ) ) {
    $breadcrumb[] = array(
    'url' => get_permalink( 321 ),
    'text' => 'Blog',
    ); array_splice( $links, 1, -2, $breadcrumb ); } return $links;
    }
    add_filter( 'wpseo_breadcrumb_links', 'fix_blog_bc_path' );

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

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Maybellyne

    (@maybellyne)

    Hello @cinnamonlou,

    Thanks for using the Yoast SEO plugin. I ran your URL through the rich results test tool and can confirm the error. However, it’s not coming from the Yoast SEO structured data output. Can you delete your code implementation temporarily and check if the error still happens?

    I await your feedback.

    Thread Starter cinnamonlou

    (@cinnamonlou)

    Hello, thank you for your response. I’m hoping you might clarify a couple of things for me:

    1. If I’m using Yoast to display the breadcrumbs, I don’t understand why you say the error isn’t coming from Yoast? I fear I am misunderstanding something here!
    2. My custom code is so I can get the individual blog post breadcrumbs to include “Blog” (blog landing page) in the breadcrumb structure. Is there another way to accomplish this without custom code?

    Thank you! I will have to discuss the implications, of temporarily removing the code, with my client.

    Plugin Support Maybellyne

    (@maybellyne)

    If I’m using Yoast to display the breadcrumbs, I don’t understand why you say the error isn’t coming from Yoast? I fear I am misunderstanding something here!

    Did you get a chance to look at the rich results test tool? Here’s a screenshot that shows the source of the error is not from Yoast SEO. Our plugin’s output starts with <script type="application/ld+json" class="yoast-schema-graph">. The error is further down and outside of our output.

    My custom code is so I can get the individual blog post breadcrumbs to include “Blog” (blog landing page) in the breadcrumb structure. Is there another way to accomplish this without custom code?

    Showing Blog in the breadcrumbs path is possible with the Yoast SEO plugin, but that also depends on your site structure and settings. If Your homepage displays is set to Latest posts in WordPress > Settings > Reading, the feature isn’t available.

    So you may want to revisit your code implementation again.

    • This reply was modified 2 years, 1 month ago by Maybellyne.
    Thread Starter cinnamonlou

    (@cinnamonlou)

    Thank you very much for clarifying! I think I’ve finally figured out what was wrong and I *think* this is working now. If not, I’ll check back in with you.

    I appreciate the support!

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Missing field “itemListElement”’ is closed to new replies.