[Resolved] Disable breadcrumb in homepage

Home Forums Support [Resolved] Disable breadcrumb in homepage

Home Forums Support Disable breadcrumb in homepage

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #330970
    Fulvio

    Hi,
    i installed the breadcrumb of yoast and i put the php string using the hook:
    BEFORE CONTENT

    i correctly can see the breadcrumbs in blog post and not in pages.
    but i can see it in home page too.

    Is strange because is visible only in the home page but not in all the other pages.

    have you a solution to fix that?

    thanks

    #331065
    Leo
    Staff
    Customer Support

    Hi there,

    Sounds like you only want the breadcrumb to show on single posts?

    If so try wrapping the code with conditional tags: https://generatepress.com/forums/topic/can-gp-hooks-add-a-javascript-at-the-post-level/#post-329947

    More info here: https://codex.wordpress.org/Conditional_Tags#A_Single_Post_Page

    Let me know if this helps.

    #331068
    Fulvio

    thanks as you suggest
    this work fine:

    <!-- breadcrumb by joast -->
    <?php if ( is_single() ) { ?>
        <?php
    if ( function_exists('yoast_breadcrumb') ) {
    yoast_breadcrumb('
    <p id="breadcrumbs">','</p>
    ');
    }
    ?>
    <?php } ?>
    <!-- fine breadcrumb by joast -->
    #331094
    Leo
    Staff
    Customer Support

    You’re welcome 🙂

    #527512
    Soumyadip

    Hi there,
    I use yoast seo and installed breadcrumbs on my site you can see here tasty fitness recipes
    i have put the following code “after header” on hooks

    But the only problem i have is that I don’t want breadcrumb to show on my home page

    And one more thing actually i am new in this field of themes
    so i am asking disabling the breadcrumb from home, will there be any seo impact.
    Waiting for your reply

    #527903
    Leo
    Staff
    Customer Support

    Can you open a new topic for your question and link me to your site?

    This one is a bit old.

    Thanks!

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