Support » Themes and Templates » Conditional Tag, Outside Loop?

  • Resolved justbishop


    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></li>

    Is this possible?

Viewing 3 replies - 1 through 3 (of 3 total)
  • 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

    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?

    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:

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Conditional Tag, Outside Loop?’ is closed to new replies.