Title: [Plugin: WordPress SEO by Yoast] Replace variables
Last modified: August 20, 2016

---

# [Plugin: WordPress SEO by Yoast] Replace variables

 *  [codestrong](https://wordpress.org/support/users/codestrong/)
 * (@codestrong)
 * [13 years, 10 months ago](https://wordpress.org/support/topic/plugin-wordpress-seo-by-yoast-replace-variables/)
 * I did not find a mention anywhere of what var templates are available for titles,
   descriptions, etc. So, I made a list myself. Next to the template you will see
   the PHP logic being used to replace it with a value.
 * %%sep%%
    %%sitename%% %%sitedesc%% %%currenttime%% %%currentdate%% %%currentmonth%%%%
   currentyear%%
 * %%date%% $date,
    %%title%% stripslashes( $r->post_title ), %%excerpt%% ( !empty(
   $r->post_excerpt ) ) ? strip_tags( $r->post_excerpt ) : substr( strip_shortcodes(
   strip_tags( $r->post_content ) ), 0, 155 ), %%excerpt_only%% strip_tags( $r->
   post_excerpt ), %%category%% wpseo_get_terms( $r->ID, ‘category’ ), %%category_description%%!
   empty( $r->taxonomy ) ? trim( strip_tags( get_term_field( ‘description’, $r->
   term_id, $r->taxonomy ) ) ) : ”, %%tag_description%% !empty( $r->taxonomy ) ?
   trim( strip_tags( get_term_field( ‘description’, $r->term_id, $r->taxonomy ) )):”,%%
   term_description%% !empty( $r->taxonomy ) ? trim( strip_tags( get_term_field(‘
   description’, $r->term_id, $r->taxonomy ) ) ) : ”, %%term_title%% $r->name, %%
   focuskw%% wpseo_get_value( ‘focuskw’, $r->ID ), %%tag%% wpseo_get_terms( $r->
   ID, ‘post_tag’ ), %%modified%% mysql2date( get_option( ‘date_format’ ), $r->post_modified),%%
   id%% $r->ID, %%name%% get_the_author_meta( ‘display_name’, !empty( $r->post_author)?
   $r->post_author : get_query_var( ‘author’ ) ), %%userid%% !empty( $r->post_author)?
   $r->post_author : get_query_var( ‘author’ ), %%searchphrase%% esc_html( get_query_var(‘
   s’ ) ), %%page%% ( $max_num_pages > 1 && $pagenum > 1 ) ? sprintf( $sep . ‘ ‘.
   __( ‘Page %d of %d’, ‘wordpress-seo’ ), $pagenum, $max_num_pages ) : ”, %%pagetotal%%
   $max_num_pages, %%pagenumber%% $pagenum, %%caption%% $r->post_excerpt,
 * [http://wordpress.org/extend/plugins/wordpress-seo/](http://wordpress.org/extend/plugins/wordpress-seo/)

The topic ‘[Plugin: WordPress SEO by Yoast] Replace variables’ 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/)

 * 0 replies
 * 1 participant
 * Last reply from: [codestrong](https://wordpress.org/support/users/codestrong/)
 * Last activity: [13 years, 10 months ago](https://wordpress.org/support/topic/plugin-wordpress-seo-by-yoast-replace-variables/)
 * Status: not resolved