• Resolved justbishop

    (@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>https://www.mysite.com/tag/xyz/</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

    Thread Starter justbishop

    (@justbishop)

    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?

    Thread Starter justbishop

    (@justbishop)

    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:

    https://www.themelab.com/2008/04/18/see-how-easy-it-is-to-widgetize-wordpress-themes/

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