[Support request] Issues with yoast breadcrumbs

Home Forums Support [Support request] Issues with yoast breadcrumbs

Home Forums Support Issues with yoast breadcrumbs

Viewing 15 posts - 1 through 15 (of 24 total)
  • Author
    Posts
  • #2263669
    Karen

    I have added the yoast breadcrumbs with the hooks element but it seems to be loading it twice on my pages.

    https://parentingmontana.org/lying-12/

    I am getting a Missing field “item” (in “itemListElement”) error in google search console since I started using the generate press theme.

    g

    #2263686
    Leo
    Staff
    Customer Support

    Hi there,

    I have added the yoast breadcrumbs with the hooks element but it seems to be loading it twice on my pages.

    Just checked the page and am not seeing the issue. The breadcrumb is only loaded one here from what I can see:
    https://www.screencast.com/t/ewmzM99qKEH

    Am I missing something here?

    Let me know 🙂

    #2265757
    Karen

    I keep getting an issue in google search console with my Yoast breadcrumbs. I contacted Yoast and they said I had the code loaded twice. I am getting this issue: Missing field “item” (in “itemListElement”)

    #2265762
    David
    Staff
    Customer Support

    Hi there,

    can you check with Yoast and ask them where the code is being loaded twice ?

    #2265765
    Karen

    This came from them:
    However, we’re viewing the page source of the said page https://parentingmontana.org/conflict-7/ and it looks like the Yoast SEO schema metadata seems to be duplicated and is outputting twice (once on line 59, and once again on line 324), which we believe is causing the issue. You might want to review your code to see if there is a plugin or theme conflict.

    so I went in and removed all the hand-coded text purchased the premium version of the theme and loaded it with the hooks as recommended.

    #2265772
    David
    Staff
    Customer Support

    Ok, so its the yoast-schema-graph thats being loaded twice.
    I am not sure the hooked code you added to display the breadcrumbs on the front end has anything to do with that.

    Can you share ANY code you added using the GP Hooks ?

    #2265774
    Karen

    I just got this from Yoast:

    Hi Karen,

    Thanks for following up with us.

    I understand that you are noticing an error Missing field ‘item’ in itemListElement. So I checked the page via the Google Rich Results Testing Tool and noticed the same error as you have mentioned. When I looked into the source code of the page, I noticed that all the meta tags occur twice. Due to these duplicate codes, Google validates both schemas of breadcrumbs as a single one, thereby showing the errors. These duplicate codes and tags would be mostly because of using wp_head() be used twice on the respective page files by your theme developer, or whether the theme which you are using is adding all the tags within the <head> </head> twice for the respective pages, or else it will be some errors within the theme. As other plugin meta tags are also occurring twice, can you please contact your theme developer to look into this case?

    You can search the <head> within the page source code and can find out all the codes that are duplicating. So I also recommend you perform a conflict check to find out whether the theme or any plugin is causing the duplication of all the <head> codes within the respective page.

    The fastest way to rule out any conflict is to deactivate all non-Yoast plugins and switch to a standard theme like Twenty Twenty. Please test this on your development or staging site, if you have one. If not, we recommend using the Health Check & Troubleshooting plugin. This plugin has a troubleshooting mode, which does not affect normal visitors to your site.

    If you’re unfamiliar with checking for conflicts, we’d like to point you to a step-by-step guide that will walk you through the process: How to check for plugin conflicts.

    #2265775
    Karen

    I thought it looked like my google tags were loading twice when I was inspecting the code. I have that placed in my header files. What am I doing wrong with the theme?

    #2265781
    David
    Staff
    Customer Support

    How is this code been added to the <head>

    2022-06-27_15-33-55

    #2265782
    Karen

    I have set up a child theme. If you would like to get in there and see what issue I have going on I can give you temp login

    Just go a head and use this login info.

    ADMIN moved login to Private Information

    #2265787
    Karen

    That is placed in my header. I was instructed to do this by a advertiser they are using.

    <!–
    Start of Floodlight Tag: Please do not remove
    Activity name of this tag: sitevisits-Fan365-ParentingMontana
    URL of the webpage where the tag is expected to be placed:
    This tag must be placed between the <body> and </body> tags, as close as possible to the opening tag.
    Creation Date: 11/18/2020
    –>
    <script type=”text/javascript”>
    var axel = Math.random() + “”;
    var a = axel * 10000000000000;
    document.write(‘<iframe src=”https://6528888.fls.doubleclick.net/activityi;src=6528888;type=count0;cat=sitev036;dc_lat=;dc_rdid=;tag_for_child_directed_treatment=;tfua=;npa=;gdpr=${GDPR};gdpr_consent=${GDPR_CONSENT_755};ord=1;num=’ + a + ‘?” width=”1″ height=”1″ frameborder=”0″ style=”display:none”></iframe>’);
    </script>
    <noscript>
    <iframe src=”https://6528888.fls.doubleclick.net/activityi;src=6528888;type=count0;cat=sitev036;dc_lat=;dc_rdid=;tag_for_child_directed_treatment=;tfua=;npa=;gdpr=${GDPR};gdpr_consent=${GDPR_CONSENT_755};ord=1;num=1??” width=”1″ height=”1″ frameborder=”0″ style=”display:none”></iframe>
    </noscript>
    <!– End of Floodlight Tag: Please do not remove –>

    #2265790
    Karen

    This is all the code in my header file:

    <?php
    /**
    * The template for displaying the header.
    *
    * @package GeneratePress
    */

    if ( ! defined( ‘ABSPATH’ ) ) {
    exit; // Exit if accessed directly.
    }

    ?><!DOCTYPE html>
    <html <?php language_attributes(); ?>>
    <head>

    <!–
    Start of Floodlight Tag: Please do not remove
    Activity name of this tag: sitevisits-Fan365-ParentingMontana
    URL of the webpage where the tag is expected to be placed:
    This tag must be placed between the <body> and </body> tags, as close as possible to the opening tag.
    Creation Date: 11/18/2020
    –>
    <script type=”text/javascript”>
    var axel = Math.random() + “”;
    var a = axel * 10000000000000;
    document.write(‘<iframe src=”https://6528888.fls.doubleclick.net/activityi;src=6528888;type=count0;cat=sitev036;dc_lat=;dc_rdid=;tag_for_child_directed_treatment=;tfua=;npa=;gdpr=${GDPR};gdpr_consent=${GDPR_CONSENT_755};ord=1;num=’ + a + ‘?” width=”1″ height=”1″ frameborder=”0″ style=”display:none”></iframe>’);
    </script>
    <noscript>
    <iframe src=”https://6528888.fls.doubleclick.net/activityi;src=6528888;type=count0;cat=sitev036;dc_lat=;dc_rdid=;tag_for_child_directed_treatment=;tfua=;npa=;gdpr=${GDPR};gdpr_consent=${GDPR_CONSENT_755};ord=1;num=1??” width=”1″ height=”1″ frameborder=”0″ style=”display:none”></iframe>
    </noscript>
    <!– End of Floodlight Tag: Please do not remove –>

    <meta charset=”<?php bloginfo( ‘charset’ ); ?>”>
    <meta http-equiv=”X-UA-Compatible” content=”IE=9″>

    <meta name=”viewport” content=”width=device-width, initial-scale=1″>

    <link rel=”profile” href=”http://gmpg.org/xfn/11″&gt;

    <link rel=”pingback” href=”<?php bloginfo( ‘pingback_url’ ); ?>”>

    <?php wp_head(); ?>

    <!– Global site tag (gtag.js) – Google Analytics –>
    <script async src=”https://www.googletagmanager.com/gtag/js?id=UA-131868742-1″></script&gt;
    <script>
    window.dataLayer = window.dataLayer || [];
    function gtag(){dataLayer.push(arguments);}
    gtag(‘js’, new Date());

    gtag(‘config’, ‘UA-131868742-1’);
    </script>
    <!– Global site tag (gtag.js) – Google Analytics –>
    <script async src=”https://www.googletagmanager.com/gtag/js?id=G-06Y38TM0VR”></script&gt;
    <script>
    window.dataLayer = window.dataLayer || [];
    function gtag(){dataLayer.push(arguments);}
    gtag(‘js’, new Date());

    gtag(‘config’, ‘G-06Y38TM0VR’);
    </script>

    <meta charset=”<?php bloginfo( ‘charset’ ); ?>”>
    <link rel=”profile” href=”https://gmpg.org/xfn/11″&gt;
    <?php wp_head(); ?>
    </head>

    <body
    <?php body_class(); ?> <?php generate_do_microdata( ‘body’ ); ?>>

    <?php
    /**
    * wp_body_open hook.
    *
    * @since 2.3
    */
    do_action( ‘wp_body_open’ ); // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound — core WP hook.

    /**
    * generate_before_header hook.
    *
    * @since 0.1
    *
    * @hooked generate_do_skip_to_content_link – 2
    * @hooked generate_top_bar – 5
    * @hooked generate_add_navigation_before_header – 5
    */
    do_action( ‘generate_before_header’ );

    /**
    * generate_header hook.
    *
    * @since 1.3.42
    *
    * @hooked generate_construct_header – 10
    */
    do_action( ‘generate_header’ );

    /**
    * generate_after_header hook.
    *
    * @since 0.1
    *
    * @hooked generate_featured_page_header – 10
    */
    do_action( ‘generate_after_header’ );
    ?>

    <h4 style=”text-align: center; color:#ffffff;”>
    Interested in a free and private parenting coach to help you navigate parenting challenges? Click here for more information.</h4>

    >
    <?php
    /**
    * generate_inside_site_container hook.
    *
    * @since 2.4
    */
    do_action( ‘generate_inside_site_container’ );
    ?>

    >
    <?php
    /**
    * generate_inside_container hook.
    *
    * @since 0.1
    */
    do_action( ‘generate_inside_container’ );
    #2265792
    David
    Staff
    Customer Support

    OK, so i logged in, and the header.php is the issue.

    Can you:

    1. Delete your child theme header.php

    2. Create a new Hook Element in Appearance > Elements
    2.1 Paste in that Code the advertiser provided into the text area.
    2.2 Set the Hook to wp_head
    2.3 Set the Display Rules to the Entire Site.
    2.4 Publish the hook.

    Please DO NOT include this in the Hook:

    <meta charset="<?php bloginfo( 'charset' ); ?>">
    	<link rel="profile" href="https://gmpg.org/xfn/11">
    	<?php wp_head(); ?>

    The Theme handles that.

    #2265796
    Karen

    ok – What about the Google Analytics stuff?

    #2265927
    Karen

    OK – I did that. what about my Google Analytics stuff. Should I add that via tag manager or with a hook?

Viewing 15 posts - 1 through 15 (of 24 total)
  • You must be logged in to reply to this topic.