I'm using Wordpress SEO by Yoast, the free version and wondering if there is a way to create custom tags such as %%city%%.

I want to make my own that can pull data from another plugin i'm using as a "directory" called Web 2.0 Directory. I want to input options inputted from that such as %%doctorname%% and %%city%%.

Is this possible? If so what file(s) should I reference and can you give me a brief overview on how to go about that??

Each directory listing has separate fields for these items, but I cannot seem to figure out where I can create my own tag calls to produce these custom tags.



Just look to plugin...

There is a hook filter for replacements wpseo_replacements, so code can look something like this...

add_filter('wpseo_replacements', 'city_wpseo_replacements');
function city_wpseo_replacements($vars){
    $vars['%%city%%'] = 'some city';
    return $vars;       
| improve this answer | |

Not the answer you're looking for? Browse other questions tagged or ask your own question.