Is there any way to combine a category and a parent page?

Forums Forums Menus Is there any way to combine a category and a parent page?

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #806
    booobooo
    Member

    I’m working on this layout: http://tinyurl.com/qgbayg

    and am coming up against an slight issue. If you click through to either the gallery or the framing section (doesn’t matter) you’ll see the menu bar at the top. The first two options are "Exhibits" (a category) and "Gallery" (a page)

    I want the categories that list under "Exhibits" to actually appear in the "Gallery" dropdown:

    GALLERY                (page)
    -CURRENT              (category)
    -UPCOMING              (category)
    -PAST                  (category)
    -SUBMISSIONS          (page)
    -MAYBE MORE OPTIONS    (pages)

    The two easy ways of doing this have bad consequences:

    a) I can use the page2cat plugin to make current, past and upcoming pages and then stick the category links in there. There is limited functionality there, however, and it just makes a huge mess of redundant looking posts that no one but me will ever understand.

    b) I can use the multi-level menu option for a custom menu and just hardwire that drop down so that it has the options I want. However, if someone wants to add something to the "Gallery" dropdown it won’t dynamically add it. Similarly, if the permalinks or titles change the custom menu won’t know it.

    So basically, I’m wondering if there’s any way to rig the multi-level menu plug-in to do it? If not I’ll probably settle for option b since at least it’s invisible for the end user.

    Thanks!

    #6177

    You can use the ‘Categories (single dropdown)’ option and then specify a URL and title for the top level menu item for the category. As long as you specified the page name and URL for that top level item then it should behave as you want it to.

    #6178
    booobooo
    Member

    Hey that’s pretty cool. Now look again. I have two "Gallery" options: One what you just described and one for the Gallery page with its subpages. Any way to combine them? Any way to get those gallery subpages to appear under my new category list with its modified top level menu item?

    #6179

    Yes you could do that, but it would require some custom scripting to get it working.

    #6180
    booobooo
    Member

    You’re right. I added this to line 106 of core.php:

    … wp_list_pages(‘child_of=11&title_li=’);"</ul></li>n";

    And that did it. Sweet! Now you can see a mix of cats and pages in the same drop down.

    Thanks for the guidance.

    #6181

    I’ll consider adding another option for this in a future version to save you having to hack the core plugin files to do it.

    #6182
    booobooo
    Member

    Sounds good! I’ll have to keep an eye on updates in the meantime because obviously I don’t want to lose my changes.

    If you want to see it in action I’ve moved it: http://tinyurl.com/qhqna2

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.