Breadcrumb change label for post type

#897158
  • Hi

    I’m using your Breadcrumb function on WordPress, and i need to rename/change the post type name in the breadcrumb.
    My breadcrumb is organized this way:

    Home -> Post type -> Category -> Post title

    I can’t find the setting or a snippet for this.

    Regards

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

    We apologize for the issue you are facing with changing the post type label in your breadcrumbs. To customize the breadcrumb strings, including the post type name, you can use a filter in your theme’s functions.php file. Here’s a snippet you can use:

    /**
     * Filter to change breadcrumb strings.
     *
     * @param  array $settings Breadcrumb Strings.
     * @return array $strings.
     */
    add_filter('rank_math/frontend/breadcrumb/strings', function ($strings) {
        $strings['archive_format'] = 'Your Custom Post Type'; // Change this to your desired label
        return $strings;
    });

    Replace 'Your Custom Post Type' with the label you want to display in the breadcrumbs. This will override the default post type name in your breadcrumb structure.

    For more details on breadcrumb settings, you can refer to our documentation here.

    Thank you for raising this concern! If you have any further questions or need assistance, feel free to reply to this ticket.

    Sources:
    How to Make Your Theme Rank Math Compatible » Rank Math

    I tried the snippet, is still does not work.

    Hello,

    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.

    Please do take a complete backup of your website before sharing the information with us.

    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/

    We really look 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 3 replies - 1 through 3 (of 3 total)

The ticket ‘Breadcrumb change label for post type’ is closed to new replies.