Breadcrumbs remove page 2,3,4

#273585
  • Resolved Dat Nguyen Dinh
    Rank Math free

    Hello every body.I have 1 problem here. I want to remove pagination from breadcrumbs
    ex: Home > Technology > Page 23
    I want delete Page 23.
    Breadcrumbs I want : Home > Technology
    Thanks you

Viewing 7 replies - 1 through 7 (of 7 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 share the affected URL to check?

    Meanwhile, to remove the title, head over to Rank Math > General Settings > Breadcrumbs and enable the Hide Post Title option:

    Hide title

    I hope that helps.

    Thank you.

    Hi sir,
    My website: https://nhakhoa.boostup.vn/kien-thuc-nha-khoa/page/16/
    My breadcrumbs is: Trang Chủ > Kiến Thức Nha Khoa > Page 16
    I want to show only Trang Chủ > Kiến Thức Nha Khoa
    Page 16 is navigation of my blog

    Hello,

    Have you tried considering the option my colleague provided? Although hiding the post title will be applied globally.

    If this isn’t the best option for you, you can make use of this filter and include the code in your theme’s functions.php file:

    add_filter( 'rank_math/frontend/breadcrumb/settings', function( $settings ) {
        if( ... ){ // Insert condition
            $settings = array(
                'home' => true,
                'separator' => '>',
                'remove_title' => true,
                'hide_tax_name' => '',
                'show_ancestors' => '',
            );
        }
        return $settings;
    }

    Do note that you have to further customize and expand this code as per your requirements. This code is only a placeholder.

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

    Oh no I don’t need to hide the post title.
    I want to customize breadcrumbs of category page.
    Example: I have 100 post in category. Post categories will be paginated. The list of articles will be paginated into 10 pages. So each page will have a breadcrum with a page number.
    -> Home/ Blog
    -> Home/ Blog/ Page 1
    -> Home/ Blog/ Page 2
    -> Home/ Blog/ Page 3
    … and more
    I need to set them to the following: Home / Blog

    Hello,

    Could you please try the following filter to remove the last crumb from the pagination pages?

    
    add_filter( 'rank_math/frontend/breadcrumb/items', function( $crumbs, $class ) {
        if(is_paged()) {
            unset($crumbs[2]);
        }
        return $crumbs;
    }, 10, 2);
    

    Let us know if that helps solve your issues.

    Looking forward to hearing back from you.

    Oh thanks you sir.
    This work for me

    Azib Yaqoob
    Rank Math business

    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.

    If you don’t mind me asking, could you please leave us a review (if you haven’t already) on https://wordpress.org/support/plugin/seo-by-rank-math/reviews/#new-post about your overall experience with Rank Math? We appreciate your time and patience.

    If you do have another question in the future, please feel free to create a new forum topic, and it will be our pleasure to assist you again.

    Thank you.

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

The ticket ‘Breadcrumbs remove page 2,3,4’ is closed to new replies.