-
Hi
I want to active title permalink in my breadcrumbs.
What should I do?
Thanks
-
Hello,
Thank you for contacting the support, and sorry for any inconvenience that might have been caused due to that.
Please make sure the “Hide Post Title” option is not enabled in WordPress Dashboard > Rank Math > General Settings > Breadcrumbs.
If the issue persists, please let us know.
We are looking forward to helping you.
Hello
I dont want to remove title, I want to link to himself.
Example:
in product breadcrumbs, at last part of product name, linked to current product url.
ThanksHello,
Please try the code below. It will add a link to the last part of the breadcrumbs.
add_filter( 'rank_math/frontend/breadcrumb/html', function( $html, $crumbs, $class ) { $html = str_replace('<span class="last">'.get_the_title().'</span>', '<a href="'.get_the_permalink().'">'.get_the_title().'</a>', $html); return $html; }, 10, 3);
Please let us know if this helps.
Thank you.
Thank so much for replay.
This code not working for me!
I didn’t see this span with this class.
What I most doing?Hello,
Have you tried adding this code to the theme’s
function.php
file?You need to add the code at the bottom of your
functions.php
file.I hope this helps. Looking forward to helping you.
Hello
This code just work on product page, also I want to link last part of category page.
Example:
category_parent>subcategory
subcategory Link to himself.
ThanksHello,
Would you mind sharing an example URL of the category pages you wish to add this in the sensitive data section?
Looking forward to helping you.
Hello,
I have updated the sensitive data as requested. Can you please check further?
Thank you.
Hello,
I was able to formulate the following filter that works for the category pages:
add_filter( 'rank_math/frontend/breadcrumb/html', function( $html, $crumbs, $class ) { $old = '<span class="last">'. wp_get_document_title() .'</span>'; $new = '<a class="last" href="'. get_the_permalink() .'">'. wp_get_document_title() .'</a>'; $html = str_replace($old, $new, $html); return $html; }, 10, 3);
Please test this and let us know if it works.\
Thank you
Thanks, This code note working
Hello,
I am happy it helped you. Do you have any other questions or do you want us to mark this as solved?
Thank you.
Hello
This code note working!
PLS help!Hello,
We can try and modify & test the code from your end.
To do this, please edit the first post on this ticket and include your WordPress & FTP logins in the designated 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.
The ticket ‘breadcrumbs’ is closed to new replies.