breadcrumb code hide on home page

#22710
  • Resolved Ray
    Rank Math free

    Hello.

    I’d like to apply breadcrumb on my website, I decided to put the code (<?php if (function_exists(‘rank_math_the_breadcrumbs’)) rank_math_the_breadcrumbs(); ?>) on the bottom of “header.php” ( currently I am using Twenty Twelve theme) and It worked well but it showed on home page too. I wish the breadcrumb would not show on home page, how could I fix it?

    PS: don’t prefer using css, I wish to have a php solutions.

    Thanks~

Viewing 1 replies (of 1 total)
  • Hello,

    Thank you for contacting Rank Math and sorry for any inconvenience that might have been caused due to that.

    You can modify the breadcrumb code to the following to prevent the display of the breadcrumbs on the homepage when your either have a static homepage or the homepage is set to show blog posts:
    <?php if (function_exists('rank_math_the_breadcrumbs') && !is_home() && !is_front_page()) rank_math_the_breadcrumbs(); ?>

    Looking forward to helping you. Thank you.

    ​​​​​​​

    Hello,

    Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.

    If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.

    Thank you.

Viewing 1 replies (of 1 total)

The ticket ‘breadcrumb code hide on home page’ is closed to new replies.