A
A
apptimeru2016-03-26 02:40:24
WordPress
apptimeru, 2016-03-26 02:40:24

How to change title in wordpress taxonomy?

Guys tell me for several hours I've been fighting.
There is a custom post type, they have their own categories. And so already what only did not do I can not replace page heading.
Tried like this, but the header is not replaced, probably because the get_query_var function is not working in function.php

function new_title_tag($title) {
  if(get_query_var('taxonomy')) $title = 'Свой текст '.get_query_var('term')." ".$title;
  return $title;
}
add_filter('wp_title', 'new_title_tag');

Please tell me how can I solve the problem?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question