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.

Is there any hook for a tag page, so I can alter it's content before outputting?

share|improve this question
1  
Do you mean wp-admin page or front-end tag archive? What exactly do you want to modify? –  Rarst Mar 21 '11 at 14:51
    
front-end only. –  user4110 Mar 21 '11 at 16:38
    
Duplicate question wordpress.stackexchange.com/questions/12640/… –  Wyck Mar 21 '11 at 17:48
add comment

2 Answers 2

There is a conditional called :

is_tag

//From the codex

is_tag();
// When any Tag archive page is being displayed.

is_tag('mild');
// When the archive page for tag with the slug of 'mild' is being displayed.

is_tag(array('sharp','mild','extreme'));
// Returns true when the tag archive being displayed has a slug of either "sharp", "mild", or "extreme".

http://codex.wordpress.org/Function_Reference/is_tag

share|improve this answer
add comment

Archive pages are not generated by some specific function, but are produced by processing template file from your theme.

For tag archive page see Template Hierarchy > Tag display to determine which file in your theme could be it.

If theme you are using comes from official repository and likely to be updated it's good practice to create Child Theme for it, so that your tweaks survive update.

share|improve this answer
add comment

Your Answer

 
discard

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