Setting Up RankMath’s Breadcrumbs

#46029
  • Resolved Georgi
    Rank Math free

    Hello,

    After sucessfully moving with RankMath, I decided to use plugin’s breadcrumbs, however the theme doesn’t recognize them.

    I was referred to the template-tags.php file to edit the woodmart_page_title function, however replacing the top two lines with your code didn’t bring results. Can you help, please?

    This is the page title function I was referred to by my theme provider https://pastebin.com/dKHVCL7R

    • This topic was modified 4 years, 8 months ago by Georgi.
Viewing 15 replies - 1 through 15 (of 20 total)
  • Alberto
    Rank Math business

    Hello,

    We might need to take a closer look at the settings. Please edit the first post on this ticket and include your 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.

    Georgi
    Rank Math free

    Hello,

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

    Thank you.

    Todd
    Rank Math free

    Hi,

    I am sorry but are you asking us to make the change or not make the change?
    Can you please not update the theme or woocommerce? My child theme stopped working and I'm using the main one, so it will erase a lot of settings if any update on the theme/woocommerce.

    Do you want us to edit your theme to add the breadcrumbs code or not?

    I think you should ask your theme provider to do it if you have any theme related issues.

    Or, you can continue to use the breadcrumbs in your theme and disable the one offered by Rank Math.

    Georgi
    Rank Math free

    I was talking about the version of the plugins. But if it’s for them to be up to date, do it.

    Todd
    Rank Math free

    Hi Georgi,

    I made the change for you but it is not taking effect.

    I think more than one files need to be updated so it would be great if you can share the filenames of the files.

    Georgi
    Rank Math free

    Hi Todd,

    Have you checked line 1072 of template-tags.php where there’s something about the breadcrumbs function?

    Maybe also the single-php and page.php?

    • This reply was modified 4 years, 8 months ago by Georgi.
    • This reply was modified 4 years, 8 months ago by Georgi.
    Georgi
    Rank Math free

    .

    • This reply was modified 4 years, 8 months ago by Georgi.
    Georgi
    Rank Math free

    I’m really desperate 🙁

    Hello,

    Thank you for contacting Rank Math today.

    I don’t think that it is wise to make the changes on the parent theme. I’ve gone ahead and edited template-tags.php file on line 1798 and changed this:

    // **********************************************************************//
    // Get current breadcrumbs
    // **********************************************************************//
    
    if ( ! function_exists( 'woodmart_current_breadcrumbs' ) ) {
    	function woodmart_current_breadcrumbs( $type ) {
    		$function = ( $type == 'shop' ) ? 'woocommerce_breadcrumb' : 'woodmart_breadcrumbs';
    
    		if ( woodmart_get_opt( 'yoast_' . $type . '_breadcrumbs' ) && function_exists( 'yoast_breadcrumb' ) ) {
    			echo '<div class="yoast-breadcrumb">';
    				echo yoast_breadcrumb();
    			echo '</div>';
    		} elseif(function_exists('rank_math_the_breadcrumbs')){
    		    echo rank_math_the_breadcrumbs();
    		}
    		
    		else {
    			$function();
    		}
    	}
    }
    

    to the following:

    // **********************************************************************//
    // Get current breadcrumbs
    // **********************************************************************//
    
    if ( ! function_exists( 'woodmart_current_breadcrumbs' ) ) {
    	function woodmart_current_breadcrumbs( $type ) {
    		$function = ( $type == 'shop' ) ? 'woocommerce_breadcrumb' : 'woodmart_breadcrumbs';
    
    		if ( woodmart_get_opt( 'yoast_' . $type . '_breadcrumbs' ) && function_exists( 'yoast_breadcrumb' ) ) {
    			echo '<div class="yoast-breadcrumb">';
    				echo yoast_breadcrumb();
    			echo '</div>';
    		}		
    		else {
    			$function();
    		}
    	}
    }
    

    This works on the shop pages but we will need to customize further, please create a child theme instead.

    Looking forward to helping you. Thank you.

    ​​​​​​

    Georgi
    Rank Math free

    Hi Michael,

    Thank you so much for your support.

    I will try to do it now and inform you.

    • This reply was modified 4 years, 8 months ago by Georgi.
    • This reply was modified 4 years, 8 months ago by Georgi.
    Georgi
    Rank Math free

    I’ve gone ahead and activated the child theme 🙂

    I know you will do it but I have to say it – please, keep me a log of the edits like your comment so I can have it all documented just in case.

    • This reply was modified 4 years, 8 months ago by Georgi.
    • This reply was modified 4 years, 8 months ago by Georgi.

    HI Georgi,

    Thanks for the follow up.

    It looks like there was some previous modification that was done on the parent theme that is preventing the display of breadcrumbs. I’ve enabled the theme breadcrumbs but they don’t display as well on single posts.

    Could you please have your theme author take a look at this so that we can help further?

    Thank you.

    Georgi
    Rank Math free

    Hi Michael,

    Currently, I can see RankMath’s breadcrumbs displayed on product categories and single product pages as well. You are saying they are not appearing only on the single posts (blog posts) pages?

    Hi Georgi,

    Thanks for the follow up.

    Yes the code I added yesterday only seems to work on these pages to show the Rank Math breadcrumbs. Is the theme configured to work in this way?

    Thank you.

    Georgi
    Rank Math free

    I believe this is the way the theme is set up. It’s not a big deal blog posts don’t have breadcrumbs.

    To close this ticket:

    1) Just to be sure – you have configured the theme to use RankMath’s breadcrumbs on product categories and single product pages??
    2) In case of a theme update, will the code be wiped out?

    • This reply was modified 4 years, 8 months ago by Georgi.
Viewing 15 replies - 1 through 15 (of 20 total)

The ticket ‘Setting Up RankMath’s Breadcrumbs’ is closed to new replies.