Title: Current year
Last modified: December 28, 2019

---

# Current year

 *  Resolved [art9m](https://wordpress.org/support/users/art9m/)
 * (@art9m)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/current-year/)
 * Hello!
 * I use shortcode %%currentyear%% to display the current year in category titles
   and descriptions.
 * I want use shortcode %%currentyear%% to display “previous year” – “current year”(
   2018-2019)
 * I don’t want to manually edit hundreds of categories. Where I need to edit in
   your plugin, to show with this shortcode previous and current years?

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

 *  Plugin Support [amboutwe](https://wordpress.org/support/users/amboutwe/)
 * (@amboutwe)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/current-year/#post-12276109)
 * Starting in v7.7 of Yoast, we’ve deprecated the `%%currentyear%%` variable (along
   with some others) as we see no valid use-case for them. As **we don’t recommend
   using `%%currentyear%%`,** a similar previous year variable is not available.
 * That being said, you or your developer can use the `wpseo_register_extra_replacements`
   filter to create your own custom variables.
 * An example code snippet can be found here:
    [https://gist.github.com/amboutwe/550c10ede7d065d9264930f5480ca748#file-yoast_seo_title_custom-variable-php](https://gist.github.com/amboutwe/550c10ede7d065d9264930f5480ca748#file-yoast_seo_title_custom-variable-php)
 * Typically code snippets are added to your theme’s functions.php file. If you’re
   not familiar with using code snippets, these articles have wonderful advice:
   
   [http://www.wpbeginner.com/plugins/how-to-easily-add-custom-code-in-wordpress-without-breaking-your-site/](http://www.wpbeginner.com/plugins/how-to-easily-add-custom-code-in-wordpress-without-breaking-your-site/)
   [http://www.wpbeginner.com/beginners-guide/beginners-guide-to-pasting-snippets-from-the-web-into-wordpress/](http://www.wpbeginner.com/beginners-guide/beginners-guide-to-pasting-snippets-from-the-web-into-wordpress/)
 *  [Jerlyn](https://wordpress.org/support/users/jerparx/)
 * (@jerparx)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/current-year/#post-12289771)
 * Closed. No further questions.

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

The topic ‘Current year’ is closed to new replies.

 * ![](https://ps.w.org/wordpress-seo/assets/icon-256x256.gif?rev=3419908)
 * [Yoast SEO - Advanced SEO with real-time guidance and built-in AI](https://wordpress.org/plugins/wordpress-seo/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wordpress-seo/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wordpress-seo/)
 * [Active Topics](https://wordpress.org/support/plugin/wordpress-seo/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wordpress-seo/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wordpress-seo/reviews/)

 * 2 replies
 * 3 participants
 * Last reply from: [Jerlyn](https://wordpress.org/support/users/jerparx/)
 * Last activity: [6 years, 4 months ago](https://wordpress.org/support/topic/current-year/#post-12289771)
 * Status: resolved