WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] How to set current tab in custom navigation (header.php) (4 posts)

  1. wesburke
    Member
    Posted 5 years ago #

    Hey guys,

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

    http://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

  2. geoff67
    Member
    Posted 5 years ago #

    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.

  3. wesburke
    Member
    Posted 5 years ago #

    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

  4. wesburke
    Member
    Posted 5 years ago #

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

    Thank you

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.