WordPress.org

Ready to get started?Download WordPress

Forums

Divide pages to 2 separate navs? (9 posts)

  1. dansinch
    Member
    Posted 7 years ago #

    Is there a way to have different pages appear in 2 separate sets of navigation without using "exclude" in the wp_list_pages() function?

    I am using WordPress as a CMS, so outside of the Blog and News sections, everything else is done with pages. I have the main navigation working great but I'd like to be able to create a menu in the footer with a different set of pages.

    At this point any new pages I add will show up in the top nav by default.

    I tried creating a page called "Home" and then making the pages in the top navigation all children of that page. Then I was thinking I could create a page called "Footer" and do the same thing with the footer pages. But that adds '/home/' and '/footer/' to the URL of all those pages, which I don't want.

    I realize I could create all my pages and then just exclude the ones I don't want from both menus, but that's not really the best solution. I'll have to edit both files any time I want to add a new page. I'd like to come up with something that 'just works'.

  2. Jonathan Landrum
    Member
    Posted 7 years ago #

    Interesting conundrum. I finally decided on a few links and manually coded them into the sidebar. You could do that for one, and exclude those from the second list, keeping it dynamic.

  3. dansinch
    Member
    Posted 7 years ago #

    Until I find a good solution I'll probably do that, but I'm sure there's a way to do it all dynamically. I guess I need to start looking into creating my own plugin:)

  4. vkaryl
    Member
    Posted 7 years ago #

    If you ever plan on having someone else work on the site, don't go there.... I speak from experience with proprietary plugins which do exactly the sort of thing you seem to be looking for. It takes me an inordinate amount of time to get back into the whole stupid setup whenever the client's client needs something tweaked, because the initial setup made no sense to begin with, and wasn't properly documented.

    Of course, I get paid - but that's not the point.... The point is that proprietary plugins written to force wp into a mold for which it's entirely unsuited is - um - well.... I cleaned that up - let's just call it "the devil's work"....

  5. dansinch
    Member
    Posted 7 years ago #

    Well, this is for my own site. There would be a couple other people working on it, but they're involved in the same project I am, so it's not like there's a client to worry about. I'm doing a bunch of other custom stuff anyway, so I figured if there's a way to do it, I'm all ears.

    Still, I hear what you're saying. The last thing I need is to have to upgrade my plugin every time a new WP update comes along.

    I have to say though, having worked on way more complex content management systems, this is one thing that would put WordPress that much closer to competing with full blown CMS packages.

  6. vkaryl
    Member
    Posted 7 years ago #

    Well.... I can't really give you the code, it's copyright with no loose license to the client's client's previous programmer/host. Besides which it's totally crap code - EVEN I could write better and boy is that saying a lot! And right now, because of this crap code, the client's client's site is running on 2.0.2 - yes they asked me to upgrade it but due to the way the proprietary plugins (3 of them) are written, it would be AGONY to do it so they work right in later version, so I quoted them a grand+ and they said they'd just use it the way it is.... oh well....

    It can be done. If you are decent with php it's not too big a deal. But upgrades may still be a bitch....

  7. jwurster
    Member
    Posted 7 years ago #

    I think I have some code that could help. I wanted to have a way of controlling the horizontal menu in a theme I was using such that the background flowed down the page with the menu.

    What you want is to split up or in some other way identify what pages are to be in the top menu and what are to be in the bottom menu.

    If this is what you want, I'll dig up the code and work on it.

  8. dansinch
    Member
    Posted 7 years ago #

    That's what I was trying to do. If you have something that would make that work, I'd love to see it.

    Thanks!

  9. rslonik
    Member
    Posted 6 years ago #

    You should take a look at CMS themes at themes.wordpress.net

    http://themes.wordpress.net/?s=cms

    i use one of them: http://asnovidades.com.br
    ;)

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.