How to remove breadcrumb from frontpage

#238048
  • Resolved Dansk Kunstgalleri
    Rank Math free

    Hello support

    I have been trying to remove RankMath breadcrumb from my homepage. Duo to it not being needed on the homepage? Would prefer this to be an option in RankMath settings forward…

    I have already read two other posts about this subject, and im still very confuced. Found this code snippet, but i cant get it working.

    Where should i put the code? Im using OceanWP with Elementor Prp.

    —————————————————————————————————–

    <?php if (function_exists(‘rank_math_the_breadcrumbs’) && !is_home() && !is_front_page()) rank_math_the_breadcrumbs(); ?>

    —————————————————————————————————–

    <?php

    if (function_exists(‘rank_math_the_breadcrumbs’) && !is_home()){
    rank_math_the_breadcrumbs();
    }
    ?>

    —————————————————————————————————–

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

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

    To disable Breadcrumbs from the Home page, please add the following code at the bottom of your theme’s header.php file:

    <?php if(function_exists('rank_math_the_breadcrumbs') && (!is_home() && !is_front_page())) rank_math_the_breadcrumbs(); ?>

    If you need further assistance, please don’t hesitate to contact us.

    Thank you

    Hello,

    In using a child theme for custom functions. Where should i put the code?

    It does not work when i place it in original theme header.php folder.

    See; https://imgur.com/a/mLp6c9P

    Hello,

    In most cases, you will not see a header.php file inside your theme child, but if you do need to customize your header.php under your theme child, you can create a header.php file inside your theme child and insert your breadcrumbs code there.

    Please refer to the official WordPress’s guide: https://developer.wordpress.org/themes/advanced-topics/child-themes/

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

    Should i only add the code (<?php if(function_exists(‘rank_math_the_breadcrumbs’) && (!is_home() && !is_front_page())) rank_math_the_breadcrumbs(); ?>)?

    Or should i also create a stylesheet in the Header.php folder that i need to create?

    header.php file*

    header.php file*

    Hello,

    Sorry for the delay and any inconvenience that might have been caused due to that.

    You only need to add the code given below in your theme’s header.php file:

    if (function_exists('rank_math_the_breadcrumbs') && !is_front_page()) rank_math_the_breadcrumbs();

    This will display the breadcrumbs on every page of your site except the homepage.

    Hope this helps. Let us know if you need any further assistance.

    Im getting frustraded by slow response… This should not be hard to achive.

    Look images posted; https://imgur.com/a/eMAqSjk

    I did as you asked and it didnt help.

    What do i do to hide the breadcrumb on front page?

    Hello,

    We apologize for the unexpected delay.

    You would need to enclose the line of code with <?php .. ?>. Please use this instead:

    <?php if (function_exists('rank_math_the_breadcrumbs') && !is_front_page()) rank_math_the_breadcrumbs(); ?>

    Let us know how that goes. We are looking forward to helping 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 10 replies - 1 through 10 (of 10 total)

The ticket ‘How to remove breadcrumb from frontpage’ is closed to new replies.