Take off breadcrumbs on home page

#189435
  • Resolved Barret Davies
    Rank Math free

    Hi. I know this is a repetitive question and has been answered, but I still can’t get it to work.

    I put “<?php if (function_exists(‘rank_math_the_breadcrumbs’) && !is_home() && !is_front_page()) rank_math_the_breadcrumbs(); ?>” into my header.php file in my child theme.
    I originally created a brand new header.php file but when I put in the code, the site went blank, so I copied the header.php file from the main theme into the child theme. I tried putting it in various places within the header.php file.
    I enabled breadcrumbs from the general settings options.

    But breadcrumbs still show on the homepage. I don’t know why it’s not working. Any help would be appreciated.

Viewing 11 replies - 1 through 11 (of 11 total)
  • Hello,

    Thank you for contacting Rank Math and bringing your concern to our attention. I’m sorry for any inconvenience this issue may have caused you.

    Could you please confirm if you wanted to remove the breadcrumbs only for your homepage?

    However, to remove the breadcrumbs added by Rank Math for all of your pages, you can disable the breadcrumbs option in Rank Math > General settings.

    Once done, please clear your website’s cache and check again your homepage.

    I hope that helps. Thank you, and looking forward to your update.

    Yes, just remove the breadcrumbs from the homepage, which is set as a static page.

    Anas
    Rank Math business

    Hello,

    Could you please try adding this code at the bottom of the theme’s header.php file:
    <?php if(function_exists('rank_math_the_breadcrumbs') && (!is_home() && !is_front_page())) rank_math_the_breadcrumbs(); ?>

    I hope this helps. Looking forward to helping you.

    Thanks for your help, but unfortunately, that didn’t work. I’m not sure if placement within the header.php affects anything, so I tried in it several places but nothing resulted in the home breadcrumb being invisible on the home page, sorry.

    Hello,

    Thank you for the update.

    In this case, we might need to take a closer look at the settings. Please edit the first post on this ticket and include your WordPress & FTP logins in the designated Sensitive Data section.
    Sensitive Data Section

    It is completely secure and only our support staff has access to that section. If you want, you can use the below plugin to generate a temporary login URL to your website and share that with us instead:

    https://wordpress.org/plugins/temporary-login-without-password/

    You can use the above plugin in conjunction with the WP Security Audit Log to monitor what changes our staff might make on your website (if any):

    https://wordpress.org/plugins/wp-security-audit-log/

    Thank you, and we really look forward to helping you.

    Hello,

    I have updated the sensitive data as requested. Can you please check further?

    Thank you.

    Hello,

    Thank you for that information, and apologies for the delay.

    I’ve checked your site, and it seems that you’re using Attesa Child for your theme. However, the code seems to be missing there upon checking in Appearance > Theme Editor.

    Could you please confirm if you have placed there the code or removed it? If so, please also add your FTP logins in the sensitive data section to revert back any changes that might cause your site to be inaccessible.

    Looking forward to helping you.

    Thank you.

    I had removed it so that there was no confusion about if it was there or not. Sorry, I should have said that before. I super appreciate you taking the time to investigate this by the way. FTP details are in the sensitive data section now. Thanks

    Hello,

    Thank you for keeping in touch with us.

    The code my colleague shared is indeed working but after I take a couple of checks on your theme’s header.php file, I noticed another breadcrumb code in there, causing duplicates if you were to add another Rank Math breadcrumbs. Please see the screenshot below:
    https://i.rankmath.com/GjKp86

    Please remove the first breadcrumbs or you can contact your theme author to safely remove them for you and apply the custom code my colleague provided.

    Hope that helps and please do not hesitate to let us know if you need our assistance with anything else.

    Thanks so much. I hadn’t seen that before. Great catch.

    Brian
    Rank Math free

    Hello,

    Glad that helped.

    Please feel free to reach out to us again in case you need any other assistance.

    We are here to help.

    Thank you.

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

The ticket ‘Take off breadcrumbs on home page’ is closed to new replies.