Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #1204

    Is there a way to hide a page from the main menu, but still have it appear in the sub-navigation?

    I want to setup a FAQ section, and want links to each question in the Sub-Navigation, but don’t want them all to appear in the main menu because it would be too many link and messy.

    p.s. I have bought themes under 2 themforest usernames, but only have one forum account. I bought twicet under “vamcomputers”. If you need me to verify that somehow, let me know. I don’t want to create 2 different forum accounts if I don’t have to. Thanks.

    #34414

    You need to group your pages via your post/page editor – there you can choose if a page should be displayed as a mainpage or as a subpage (child) of a parent page.

    The Dude

    #34415

    I know how to set up page hierarchy. I think we are talking about 2 different things though.

    If you go to the site: http://sideeffectsdesign.com/wordpress/ and click on the “Support”—>”FAQs” option in the menu, you will see there is a drop down menu with a question in it (will soon be a bunch of questions). I would like to know if there is a way to stop those questions from showing up in the main drop down menu, but still show up in the Sub-Navigation menu in sidebar, like on this page: http://sideeffectsdesign.com/wordpress/?page_id=11 . Basically, I only want the questions listed in the Sub-Nav, not in the main menu.

    Is this possible? I found a Plug-in to hide pages from the main menu, but it also hides them from the Sub-Nav which doesn’t help much.

    A workaround would be if I could make that 3rd level dropdown wider so that the questions would fit on one line. I can’t figure out how to do it in the CSS though. I’d just like the them either display as one line, or not show up in the main menu at all.

    Thanks

    #34416

    Under Twicet Options you can exclude pages you don’t want to show in the main menu. You need to type the page ids of the faq pages you want to exclude into the options field called “Page Navigation”. Like:

    exclude=146,73,65

    The Dude

    #34417

    Thanks, that did it!

    One more question, is there anyway I can exclude pages that appear in the sub-navigation menu?

    #34418

    Yes that’s possible with a little modification of sidebar.php. Open this file an search for:

    $children = wp_list_pages("title_li=&sort_column=menu_order&child_of=".$post->post_parent."&echo=0");
    else
    $children = wp_list_pages("title_li=&sort_column=menu_order&child_of=".$post->ID."&echo=0");

    append “&exclude” to the parameters like in this example:

    $children = wp_list_pages("title_li=&sort_column=menu_order&exclude=340,263,500&child_of=".$post->post_parent."&echo=0");
    else
    $children = wp_list_pages("title_li=&sort_column=menu_order&exclude=340,263,500&child_of=".$post->ID."&echo=0");

    Instead of 340,263,500 fill in any numbers (page ids and post ids) you want like to exclude (seperate them with a comma (,)).

    The Dude

    #34419

    Thanks for the tips so far. That is close to what I want, but is there a way to not hide the child pages? That hid all my links on the sidebar.

    I reverted back to the other code so I can quickly explain what I am looking for. In the sidebar on this page: http://sideeffectsdesign.com/wordpress/?page_id=11 “Hosting FAQs” is the link I would like to hide. I just want the actual questions/FAQS to show up. Those individual FAQ pages are all child pages of the “Hosting FAQs” page though.

    Thanks

    #34420

    That’s even easier than my solution before :)

    Just delete following code from sidebar.php – please revert the changes I suggested before.

    if($post->post_parent)
    $children = wp_list_pages("title_li=&sort_column=menu_order&child_of=".$post->post_parent."&echo=0");
    else

    The Dude

    #34421

    Thanks!

    #34422

    Glad that everything works now as expected….

Viewing 10 posts - 1 through 10 (of 10 total)

The topic ‘Hide a page from main menu, but not from Sub-Navigation?’ is closed to new replies.