Skip to:
Content
Pages
Categories
Search
Top
Bottom

How do WordPress.org/bbPress.org’s tabs work?


  • John James Jacoby
    Keymaster

    @johnjamesjacoby

    I know this is a question geared more towards the WordPress.org forums, but because it also could be a bbPress integration question, I figured I’d post it here.

    Case:

    1.) When you are within the Blog area of the site, that the Blog tab always displays a “current” class.

    2.) When you are within the bbPress/Forum area of the site, the “Forums” tab also always shows “current.”

    To my understanding, the WordPress page function isn’t powerful enough to understand the parent/sub relationship. Curious if anyone knows of a way within WordPress to make this act in a similar fashion apart from hard-coding it. I don’t believe the WordPress.org site is hard-coded that way, but of course I could be wrong.

Viewing 5 replies - 1 through 5 (of 5 total)

  • chrishajer
    Participant

    @chrishajer

    I disagree on the WordPress page function not being powerful enough to understand parent/child. It always seems to work for me. For example, check this page:

    http://www.woods-metal-shaping.com/machine-shop/machining/risers/

    Those are WordPress pages, grandparent is machine-shop, parent machining, child risers. Check the left nav for the current page highlighted, and check the top tabs for the grandparent highlighted. So, it’s certainly possible to do whatever you want with the current class in WordPress.

    On this site, when you are on the blog page, they are probably just using the WordPress current_page_item class to highlight (home, about, documentation, blog, download.) When you click forum, you go to bbpress. So, in your bbPress template, you hard code that nav item as current. I’m not certain how the extend section works, if it’s bbPress or WordPress.) But, basically, you hard code current for the forum/forums/bbpress tab since once you click it, you’re outside WordPress.

    Now, with integration, and including the WordPress nav, I have no idea how it would work. I always thought if you had a Page called “forums” and then you installed bbPress in a directory called “forums” that the directory will override the WordPress Page, so the forum is shown, but I don’t know what happens in the nav, i.e. if WordPress still thinks you’re on a Page called “forums”.

    HTH


    John James Jacoby
    Keymaster

    @johnjamesjacoby

    On the site you’ve included above, you have a “current_page_ancestor” class. I have never seen that before, and it also isn’t what the bbp and wp sites use, making this even curiouser. You also have “page_folder” for the pages that have sub items, and again, I’ve never seen this before.

    Looks like I have homework to do?

    Chris-

    I am attempting to build a VERY similiar navigation to what you have linked to. As in, tabs along the top and a growing tree down the side, with the current tab selected for child pages. Could you expand a bit on your previous post on how you achieved this?

    -Westy


    chrishajer
    Participant

    @chrishajer

    oops johnjamesjacoby: must have missed your reply a month ago. I am using the Fold Page List plugin for WordPress. I suspect those classes come from that.

    http://www.webspaceworks.com/resources/wordpress/30/

Viewing 5 replies - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.