• Resolved wesburke

    (@wesburke)


    Hey guys,

    I think I painted myself into a corner here. I am running wordpress here at https://www.cgcookie.com. I am also working on a re-design here:

    https://www.cgcookie.com/parts.html

    The problem I am running into is that how can I set the current ID on the correct tab say when you are viewing the about page, ebook or video lessons? I was looking into a PHP solutions listed on list apart, but that doesn’t work because the header loads before the body.

    I am a 3D artists for the day job, but know enough html to be silly. Could somebody point me in the right direction, or offer any ideas on how to set up my nav so it knows if where you are at in wordpress?

    Appreciate it.

    W

Viewing 3 replies - 1 through 3 (of 3 total)
  • I think you’d have to create a separate php file (essentially a new template file) for each of your main navigation elements. Because if you were to do what ALA suggests here, there is no way to distinguish each of the pages (assuming you’ve created them with Write -> Page) since the content is pulled dynamically into page.php.

    Thread Starter wesburke

    (@wesburke)

    Thank you sir – I didn’t think about using page templates. I will give that a go and let the users know how it works here.

    Thank you

    W

    Thread Starter wesburke

    (@wesburke)

    Update: Creating custom page templates was the way to go, and worked great!

    Thank you

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How to set current tab in custom navigation (header.php)’ is closed to new replies.