Breadcrumbs – Hide Post Title in single product page only

#229614
  • Resolved Jwdegas
    Rank Math free

    Hi, hopefully the title is clear. We’d like to use ‘Hide Post Title’ just for single product page breadcrumbs in our shop, but otherwise keep the post title breadcrumb across the other site pages. Is there a filter snippet for this? Thanks, Jeremy

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

    Thank you for contacting Rank Math and bringing your concern to our attention.

    You can use and modify this filter to remove the title of that specific page:

    add_filter( 'rank_math/frontend/breadcrumb/settings', function( $settings ) {
    global $post;
    //558 -> id of the post/page
    
    if( $post->ID == 558){
    $settings = array(
    'home' => true,
    'separator' => '/',
    'remove_title' => true,
    'hide_tax_name' => '',
    'show_ancestors' => '',
    );}
    return $settings;

    And here’s a link on how to apply a filter on your site:
    https://rankmath.com/kb/filters-hooks-api-developer/

    I hope that helps.

    Thank you, and please don’t hesitate to contact us anytime if you need further assistance with anything else.

    Thanks Reinelle, updating your filter to if( is_product() ) works perfectly

    Hello,

    We are super happy that this resolved your issue. If you have any other questions in the future, know that we are here to help you.

    Thank you.

    Russia Nhung
    Rank Math free

    Hi Rankmath Support Team, I just found this topic, I tried Jwdegas solution to update “if( is_product() )”:

    add_filter( 'rank_math/frontend/breadcrumb/settings', function( $settings ) {
    global $post;
    //558 -> id of the post/page
    if( is_product() ){...  

    But it didn’t work.
    Can you share the filter to remove all product title out of Rankmath breadcrumbs?
    Just post title in single product page.
    Thank you so much!

    Hello,

    @Russia We have already replied to your other ticket. If you have further questions about the topic, you can continue on that thread.

    Looking forward to helping you.

    Thank you.

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

The ticket ‘Breadcrumbs – Hide Post Title in single product page only’ is closed to new replies.