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 Yoast's WordPress SEO plugin for a variety of websites. In setting title tag templates with his %%category%% syntax, I've figured out that you can reference custom fields by using %%cf_<custom_field_name>%%.

What I haven't been able to figure out is how to reference custom taxonomies. Within a custom post type, I have a category that I want to reference (i.e. customcategory). If I try adding %%customcategory%%, it doesn't work. Does anyone know if this is possible with the WordPress SEO plugin or point me in the right direction if I need to add a function to work with the plugin?

share|improve this question
Any luck on trying to figure this out? –  user14164 Mar 15 '12 at 1:25

2 Answers 2

You can set a filter for the title element’s content – hook 'wp_title' – and add any data you want to it. See this answer for an example.

On archives use get_queried_object() to detected the taxonomy, on singular views (posts, pages, custom post types) the global $post is available.

share|improve this answer

Did you try %%ct_%% ? For me its working when added to post titles.

share|improve this answer
This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post - you can always comment on your own posts, and once you have sufficient reputation you will be able to comment on any post. –  s_ha_dum Jun 3 '13 at 13:01
This seems like more of a request for more information than an answer. At least provide more detail if you can. –  s_ha_dum Jun 3 '13 at 13:03

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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