[resolved] Conditional Tag, Outside Loop? (4 posts)

  1. justbishop
    Posted 6 years ago #

    Wondering if there's a way to tell my header nav:

    "if a tag with slug 'xyz' exists on this blog, spit out this html: <li>http://www.mysite.com/tag/xyz/</li>"

    Is this possible?

  2. lindsayanng
    Posted 6 years ago #

    I am pretty sure that conditional tags work the same inside the header.php file as they would in the index.php or loop pages

    According to the codex you can use conditional tags in the header, if you use them in the footer you need to reset first then use them

  3. justbishop
    Posted 6 years ago #

    Thanks :)

    I'm having trouble wrapping my brain around the actual code that would do the conditional for if a tag slug exists or not. Can anyone point me in the right direction on that part?

  4. justbishop
    Posted 6 years ago #

    Ok, nevermind everyone! I decided to just widgetize my header navigation area and through the wonders of the WP 3.0 custom menu system, create a custom header nav menu and drag the widget to the newly widgetized header. Worked like a charm!!!

    If anyone else is interested in doing something similar, this was an awesome tut:


Topic Closed

This topic has been closed to new replies.

About this Topic