Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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.

Thanks!

share|improve this question

closed as off-topic by Mark Kaplun, Johannes Pille, mrwweb, Pieter Goosen, birgire Sep 6 at 8:03

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Your question should be specific to WordPress. Generic PHP/JS/HTML/CSS questions might be better asked at Stack Overflow or another appropriate site of the Stack Exchange network. Third party plugins and themes are off topic." – Mark Kaplun, Johannes Pille, mrwweb, Pieter Goosen, birgire
If this question can be reworded to fit the rules in the help center, please edit the question.

1 Answer 1

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;       
}
share|improve this answer

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