Forum Replies Created

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter stitch1z

    (@stitch1z)

    No, it didn’t work. But thank you again.

    The only things I have used that get a response are “term_exists” and “get_terms”, but as I said, then the new header shows up on every custom post type post instead of just the category I identified.

    To troubleshoot, I tested by putting in a false category. Nothing showed up. So calling the category is working, it just isn’t limiting itself… If that makes any sense.

    Thread Starter stitch1z

    (@stitch1z)

    Thank you again, Harmck, but it still doesn’t work.

    I actually tried that before (and just retried it, copying and pasting your code). I even tried using “in_category” as well as trying “is_category”.

    Anyway, I’m pretty sure that those functions don’t work on the custom post types. At least that’s what I have gathered so far.

    But thank you again for your help!

    Thread Starter stitch1z

    (@stitch1z)

    No code before the term_exists line.

    If I put a false value in the (), it retrieves my normal header. But like I said, when I set it to the correct ID, it puts the new header on all single posts of the custom post type. Odd.

    Same happened when I used “get_term”.

    If terms aren’t the way to go, any other idea how to call header-header2.php in a certain category and its children in a custom post type single post?

    Thank you for your help.

    Thread Starter stitch1z

    (@stitch1z)

    Yeah, header-header2.php is fine. I have called it up with “is_tax” and on a custom page template.

    It even works as printed above, the only problem is that it shows up on ALL of my custom post type single posts instead of just the category that I specified.

    If there is a better way to call header-header2.php to certain single custom post type posts (like a custom template or something), I’m open to it, although being able to specify it by category (and its children) would be optimal for me.

Viewing 4 replies - 1 through 4 (of 4 total)