RankMath primary category bug

  • I have found the similar problem on the forum, but seems it hasn’t been solved

    Each product has a few categories assigned to it. I have set a primary category for each product, however it ignores the primary and uses the first selected category from the list on the product edit page (admin side).

    For example the breadcrumb should look like this:

    Home » Shop » Primary Category » Product Page Title

    But instead looks like this:

    Home » Shop » First Selected Category » Product Page Title

    Many thanks!

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

    Thanks for getting in touch with us today.

    I cannot replicate this problem on my end. We might need to take a closer look at your 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:

    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):

    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,

    Thank you for contacting Rank Math today.

    The affected product pages are using WooCommerce breadcrumbs and not Rank Math as you can see below:
    Crumb

    I have modified breadcrumbs.php on the parent theme file and commented out the flatsome breadcrumbs as shown below to add Rank Math breadcrumbs:

    <?php
    	$classes = array();
    	$classes[] = 'is-'.get_theme_mod('breadcrumb_size', 'large');
    ?>
    <div class="<?php echo implode(' ', $classes); ?>">
    	<?php //flatsome_breadcrumb(); ?>
    	<?php if (function_exists('rank_math_the_breadcrumbs')) rank_math_the_breadcrumbs(); ?>
    
    </div>

    I can suggest that you reach out to your theme author for some help on how to override this template so that the changes do not get lost on the next theme update.

    Looking forward to helping you. Thank you.

    ​​​​​​

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

You must be logged in to reply to this ticket.