-
The current year variable in the post title is still showing the last year and not the current year. It still appears as 2023 and not 2024. What is the issue and what needs to be done?
-
Hello,
We apologize for the inconvenience you’re experiencing with the current year variable in the post title. It seems that the shortcode for the current year is not updating to 2024 as expected.
To resolve this issue, please ensure that you have added the correct code snippet to your theme’s file editor. You can refer to this link for detailed instructions on how to set the current year in the post title using the
[year]
shortcode.If you have already added the code snippet and are still facing issues, please ensure that you have updated the file after adding the code snippet. You can refer to this link for detailed instructions on how to update the file.
If the issue persists, please feel free to assign this ticket to our support team using the available buttons, and we will be more than happy to assist you further.
Sources:
Set the Current Year in Post Title Using the [year] Shortcode » Rank Math
Using Variables in the SEO Title and Description » Rank Math
Image SEO Options in Rank MathI also noticed that the serps are showing my site URL instead of the site title for every search result. Please look into that as well.
Hello,
Thank you for your query, and we are so sorry about the trouble this must have caused.
The current year variable in the post title is still showing the last year and not the current year. It still appears as 2023 and not 2024. What is the issue and what needs to be done?
We tried to replicate this on our local installation but we did not face any issues.
Upon checking we were able to see the value “2024” for the variable
%currentyear%
.Please refer to the screenshot below :
https://monosnap.com/direct/s6O5vhlAdrAILEzaHLkk9yl7To85NACould you also share a screenshot of the page where you see this issue ?
You can use tools like Imgur (https://imgur.com/upload) to upload the screenshots and share the generated links here.
Also is it that you are refreeing to the year being shown as 2023 still in Google SERPs ?
If that is the case then it is a pretty common thing with Google these days. It happens with 70% of the results and we even have a KB dedicated to this problem and a few solutions we recommend:
https://rankmath.com/kb/different-meta-title-and-description/
Please check the KB and you will understand the reasons Google does this.
Google has made some changes to their algorithm which automatically changes the titles, discarding the one you have set in your SEO title meta tag. This happens regardless of the SEO plugin you are using. We have covered this Google update here:
https://rankmath.com/google-update/google-title-rewrite-update/
I also noticed that the serps are showing my site URL instead of the site title for every search result. Please look into that as well.
We checked the serps using the
site:
operator and we could see that the site title is appearing and not the site urlPlease refer to the screenshot below :
https://monosnap.com/direct/bYGzsqP8EM6Ns9MV6tM2WTo64brLNWIn this case are you referring to the sitename being shown as the site domain ?
If that is the case then are you asking why
divinedisclosures.com
is being shown instead ofDivine Disclosures
in plave of the sitename ?If you are facing an issue where Google Search Results display your domain as the site name instead of the actual site name.
There are various sources that Google uses to define your site name on SERPs:
1 .
og:site_name
2 . WebSitestructured data
3 . Content intitle
elements
4 .Heading
elementsRank Math automatically incorporates the
og:site_name
meta tag and the WebSiteSchema
on your page.This aids Google in understanding and displaying your desired site name.
To address this and encourage Google to display the sitename instead of domain please follow these steps:
1 . Ensure that your website’s
<title>
tag on the homepage reflects sitename accurately.2 . Update the
og:site_name
meta tag to add sitename within Rank Math settings.3 . Double-check that your logo
alt text
and other significant areas on your site mention the sitename.4 . Make sure
internal links
within your site use sitename rather than the domain.5 . After making these adjustments, utilize the
URL Inspection Tool
in Google Search Console to request indexing for your homepage.6 . Ensure sitename is consistently represented across all
online profiles
, directories, and other platforms.7 . If you’ve rebranded or changed the name in the past, verify there’s no
legacy content
, old sitemaps, or outdated pages sending conflicting signals to Google.8 . Remember, you’ll need patience as Google
re-crawls
andre-indexes
your site. It might take some time before these updates reflect in the SERPs.It’s important to note that while these steps can guide Google, the final site name display in SERPs is determined by Google’s algorithm, based on what it deems relevant and user-friendly.
You can further understand this by reviewing Google’s documentation on site-name: Google Site Names Documentation.
https://developers.google.com/search/docs/appearance/site-namesWe hope that helps, and please don’t hesitate to get in touch if you have any other questions.
Thank you.
Hello,
I have updated the sensitive data as requested. Can you please check further?
Thank you.
If that is the case then are you asking why divinedisclosures.com is being shown instead of Divine Disclosures in place of the sitename? YES!
I believe all of what you stated are basically done. You can check further on my site, but I am not sure why its picking up the URL instead of the actual name.
ALso where the current year variable is concerned, I noticed some posts from last year have been changed to 2024 whereas some of the earlier posts have not. I have added some screenshots.
Hello,
It is Google’s prerogative how the sitename is shown in the SERPs. No plugin can influence it beyond adding the correct meta tags which Rank Math has done.
You can use the Google URL Inspection Tool to request a recrawl of your website. This will tell Google to re-fetch your website data and update them accordingly. You can find the tool here: https://support.google.com/webmasters/answer/9012289#request_indexing
We hope this helps.
Thanks.
So are you saying that based on the Rank Math plugin and my inserts, everything has been correctly given but even so Google has not decided to add the name but the URL?
Hello,
We can see that your og:site_name correctly shows “Divine Disclosures” and we can see that other metadata are appropriate:
https://monosnap.com/file/Kbg2PG9GQfSBFf40JSv5t7N1Oj62YdWhile those steps can guide Google, the final site name displayed in SERPs is determined by Google’s algorithm.
After submitting the site recrawl and reindexing kindly give Google some time to update your site’s details.
We hope that helps.
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 ‘Current Year variable has not updated to 2024’ is closed to new replies.