Title: Custom %% template variable
Last modified: August 30, 2016

---

# Custom %% template variable

 *  Resolved [Artur Cosicov](https://wordpress.org/support/users/wpcoderu/)
 * (@wpcoderu)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/custom-template-variable/)
 * How can I add custom %%my_var%% variable to use it in title and description?
 * [https://wordpress.org/plugins/wordpress-seo/](https://wordpress.org/plugins/wordpress-seo/)

Viewing 1 replies (of 1 total)

 *  Thread Starter [Artur Cosicov](https://wordpress.org/support/users/wpcoderu/)
 * (@wpcoderu)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/custom-template-variable/#post-6880711)
 * I just have added function `retrieve_my_var()` in class WPSEO_Replace_Vars
    and
   it works OK. But when I will update plugin my changes will be destroyed. Any 
   suggestions?

Viewing 1 replies (of 1 total)

The topic ‘Custom %% template variable’ 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/)

 * 1 reply
 * 1 participant
 * Last reply from: [Artur Cosicov](https://wordpress.org/support/users/wpcoderu/)
 * Last activity: [10 years, 5 months ago](https://wordpress.org/support/topic/custom-template-variable/#post-6880711)
 * Status: resolved