Change how “project” and “events” are showing in Rank Math’s breadcrumbs

#551780
  • Resolved Anonymous
    Rank Math free

    I have an issue with breadcrumbs showing the words “project” and “events” despite me having changed both the permalinks and meta titles for projects and events. How can I edit these?

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

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

    It normally prints the taxonomy title when you’re viewing the archive. Either you can change the taxonomy name or use this filter.

    add_filter( 'rank_math/frontend/breadcrumb/items', function( $crumbs, $class ) {
    	$post_type = get_post_type(get_queried_object());
    	
    	if ($post_type == 'your-post-type-name') { 
    		$crumbs[1][0] = 'Name you want to show';
    	}
    
    	return $crumbs;
    }, 10, 2);

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

    Thank you

    Anonymous
    Rank Math free

    That worked like a charm. Thanks!

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

You must be logged in to reply to this ticket.