-
Hi Team,
We have added the code snippet for [month] & [year] based upon the your article – https://rankmath.com/kb/add-current-year-in-post-title/. However, in the breadcrum it is not reflecting. It’s showing as [Month] [Year] only.
We tried codes mentioned in sensitive data section but not working.
Can you please share the correct code for posting [month] & [year] everywhere including post, title, meta description, opengraph, breadcrum etc.? Thanks.
-
Hello,
Thank you for contacting Rank Math support, and sorry for any inconvenience that might have been caused due to that.
I tested your code and it seems to be working fine on our end. The month and year were applied to the title and even on breadcrumbs. Please refer to my screenshot below:
We might need to take a closer look at the settings. Please edit the first post on this ticket and include your WordPress & FTP logins in the designated Sensitive Data section.
Please do take a complete backup of your website before sharing the information with us.
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,
The following code snippet is working on my setup:
add_filter( 'rank_math/frontend/breadcrumb/items', function( $crumbs, $class ) { $crumbs[count($crumbs)-1][0] = str_ireplace( '[year]', date( 'Y' ), $crumbs[count($crumbs)-1][0] ); $crumbs[count($crumbs)-1][0] = str_ireplace( '[month]', date_i18n("F"), $crumbs[count($crumbs)-1][0] ); return $crumbs; }, 10, 2);Hope that helps. Please let us know if you have questions.
Hello,
We have updated the same but not reflecting. Do we need to remove any snippets or add? Can you please check further and share the updated code altogether?
Thank you.
Hello,
Our account does not have access to view the theme functions.php code. Please elevate WordPress user access so we can check the code snippet.
The latest code snippet I provided is independent of the rest of the code snippets. You can remove the following filter as it is no longer necessary:
add_filter( 'rank_math/frontend/breadcrumb/html', 'do_shortcode' );Hope that helps. Please let us know if you have questions.
We have elevated you. Please check now and share the respective code with us so that this issue can be resolved quickly. Thanks.
Hello,
When I checked your website, the dates were displaying correctly. I did not make any changes so you may leave the code as is.
Hope that helps. Please let us know if you have questions.
Not at all. We are talking about the breadcrumbs not posts. We have checked different browsers and devices along with multiple other folk’s devices and everywhere it’s showing like – Home -> Offers -> Vestige Monthly Offer | Consistency Offer [month] [year] | Repurchase Offer | 6 Amazing Offers
So, please check and reply soon. You folks are very late on replies. talking the entire day even after getting responses from end users then & there like now.
Hello,
I’ve checked your site and due to limited access I was unable to go through the in-depth troubleshooting process.
However, It seems like you’re using breadcrumbs from your theme and this is why it’s not working.
But it’s working completely fine with breadcrumbs by Rank Math. I’ve attached the screenshot by editing sensitive data section.
Please try removing the current breadcrumbs setup you’ve and add breadcrumbs by Rank Math. You may follow the guide below step by step and apply them on your site:
https://rankmath.com/kb/breadcrumbs/Otherwise, you may try adding
%currentyear%%currentmonth%.Let us know how it goes. Looking forward to helping you.
Thank you.
Hello,
We have given super admin access to you folks. Not sure why you people are wasting time by sending emails on a daily basis instead of fixing the same on your own. We enabled the RM’s breadcrumb and it’s still not working. Please check the code under functions.php file and other theme-related settings maybe. Let us know still if you need to add/update any code. Can you please check further?
Thank you.
Hello,
Currently, your website’s breadcrumbs aren’t generated by Rank Math. That is why the filter code didn’t work. Please refer to the screenshot I inserted in the sensitive data section for the current breadcrumbs you have on your website.
And this is the breadcrumbs we usually generate (with class name
rank-math-breadcrumb):You need to apply our breadcrumbs first so the filter code will take effect as suggested by my colleague in the last reply.
If you wish for us to install the breadcrumbs for you, please share your FTP as we can’t currently access the theme files:
Looking forward to helping you.
It seems that you are not at all aware of WordPress settings/features and that is why you are looking theme files in the wrong place.
Also, like we mentioned earlier that we already have enabled RM breadcrumbs but not sure whether you checked that at all or not otherwise you wouldn’t have suggested us to enable again.
If you are not aware of the same then please share the code snippet which needs to be updated along with the location; we will update accordingly.
Thanks for your time.
Hello,
I understand how stressful these kinds of situations can be, and we sincerely apologize for the circumstances you have experienced.
I’ve just fixed the issue you were having, and everything is now operating as expected. Please refer to the screenshots of the sensitive data section that is provided.
Please let us know if there is anything further we can do to help. We’ll be glad to assist you.
Thank you.
Lovely.
We are able to see. It’s reflecting as expected. But it seems it’s working only for the main/primary site but not with subsite. We have updated the link of the subsite inside sensitive data. Can you please check further?
Also, it would be helpful if you can share the changes you did so that we can add the same when we add new subsites.
Thank you.
Hello,
I’ve also updated the breadcrumbs for the URL you’ve shared. For your convenience, I’ve included a quick video guide that shows you step-by-step how to apply the fix on your own.
Please refer to the screenshots and short video of the sensitive data section that is provided.
You can also try reading the documentation by Blocksy: https://creativethemes.com/blocksy/docs/general-options/breadcrumbs/
Please be advised that, clearing your site caches is a good idea if you aren’t seeing changes to your site after implementing a fix. You can simply do that, as you’re using a caching plugin.
Hope that helps, and please do not hesitate to let us know if you need our assistance with anything else.
Thank 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 ‘Set the Current Year/Month in Breadcrum | Not Working’ is closed to new replies.