Archive Category/Tag Bug ?
-
Okay. I am very confused, about this, help me, maybe I missed something.
So.<?php $return = ""; # Switch Archive Names switch($return) { # If a category, set Category title case is_category(): $return = single_term_title("", false)." Category"; break; case is_tag(): $return = single_term_title("", false)." Tag"; break; default: $return = "s"; break; ?> <h2>Archive<?php echo $return ?></h2>
It should work in theory, but what this does in reality, is quite funny.
For example, a post is in a category “FireFox” and the tag is “Minefield”.
When opening up archive for “FireFox”, I get: “Archive for FireFox Tag”
and when I open up archive for “Minefield” tag, I get “Archive for Minefield Category”.
Can someone please explain how is this possible ?
I also tried single_tag_title and single_cat_title in the correct places, was the same issue.
This is quite funny and annoying at the same time >.<
Help.p.s. (No Plugins or other themes installed, Except “Theme Check plugin”. A raw wordpress install with debug on….)
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Archive Category/Tag Bug ?’ is closed to new replies.