Category doesn’t hide on breadcrumbs

#54211
  • Resolved Daniele Fratin
    Rank Math free

    Hello,

    I’m trying to hide the category voice from the breadcrums.
    I already turned off the setting General>>Breadcrumbs>>Show categorie(s), but it doesn’t work.

    Am I wrong something?

    Thank you!
    Daniele

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

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

    Assuming you are using the latest version of all the plugins and the themes (please update if not yet), it would seem like a conflict with one of the plugins or the theme you are using.

    To determine that, please follow this troubleshooting guide:
    https://rankmath.com/kb/check-plugin-conflicts/

    Only the site admin would know and your users won’t be affected by this troubleshooting.

    Please let us know if you find the culprit. If you don’t we would love to take a look, you can elevate the access permissions for the shared details.

    Looking forward to helping you.

    Dear Michael,
    thank you for your reply.

    The only plugin installed is Elementor Pro featuring Hello theme. The strictly necessary to built my website. Disabling it I can’t see my website, so I can’t find out the problem.

    Any other suggestion?

    Thank you
    Daniele

    Hello Daniele,

    We might need to take a closer look at the settings. Please elevate the access for the provided WP 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/

    We really look forward to helping you.

    Hello,

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

    Thank you.

    Hello Michael,

    I have updated the sensitive data with access as administrator.
    Looking forward to your feedback!

    Thank you,
    Daniele

    Alberto
    Rank Math business

    Hello,

    Since it is not the usual, Rank Math doesn’t have a function to remove the Category from the Breadcrumbs.

    But I did some custom PHP code using the Rank Math filters so now, as you can see on your website, the breadcrumbs are just as you wanted.

    For anyone interested in this in the future, you just need to add at the end of your functions.php file on your current theme the following code:

    /**
     * Remove Category from the Breadcrumbs
     *
     * @param array       $crumbs The crumbs array.
     * @param Breadcrumbs $this   Current breadcrumb object.
     */
    add_filter( 'rank_math/frontend/breadcrumb/items', function( $crumbs, $class ) {
    	$ret = $crumbs;
    	if(is_single()){
    		unset($ret[1]);
    	}
    	return $ret;
    }, 10, 2);

    Looking forward to help you.

    Hello Alberto,
    thank you for your workaround, it works!

    Only one question: if RM doesn’t have the function to remove the category from breadcrumbs, what is needed the setting under General settings >> Breadcrumbs >> Show categories?

    Thank you!
    Daniele

    Hello,

    Thank you for contacting Rank Math today.

    We are glad your issue is now resolved. This option will essentially hide the parent categories from the breadcrumbs.

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

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

You must be logged in to reply to this ticket.