WordPress.org

Forums

Custom Menu Item with auto created Category list (5 posts)

  1. becks-star
    Member
    Posted 1 year ago #

    Hi there,
    i was searching a lot before and couldnt find what i needed.

    What i have is a custom menu (which i need to use because of the template i use).
    In this menu i want to have an item named "by category". When hovering over this item it should present an alphabetical list of all my categories.

    I know how to create a menu item and add all categories manually. But i want this menu always to have all categories automatically, even when new ones are created.

    I also know about the funtions get_categories and so on, but since i dont want to have the menu item "by category" at the end of the menu, but on place 2, meaning "between" items of the custom menu, adding this manually to the template is no option for me.

    So, how can i add a menu item with an "auto created" submenu of all my categories?

    Thanks a lot in advance
    Daniel

  2. Kori Ashton
    Member
    Posted 1 year ago #

    Hi Daniel - inside of WordPress widgets you should find an available widget called "Categories." This should automatically list your categories (if you have an article published in that category). It will not list the categories if there are no articles.

    Dashboard >> Appearance >> Widgets

  3. becks-star
    Member
    Posted 1 year ago #

    Hi Kori, thanks for the reply.
    The problem is, as i wrote above, i need to use the custom menu. And afaik it is not possible to add a widget to a menu as item, or am i wrong?
    Would be great if i really am, but then please let me know how to do it :)
    Thanks
    Daniel

  4. Kori Ashton
    Member
    Posted 1 year ago #

    I'm not familiar with dynamically adding categories to your main menu. What if you did a work around like this thread suggests?

    Place a page in your top menu that might say "Categories" then once they land on that page there's a dynamic list (sort of like a sitemap) visible for them to choose a category.

    Would this work?

    http://wordpress.org/support/topic/link-categories-in-menu-manager?replies=5

    and
    http://codex.wordpress.org/FAQ_Layout_and_Design#How_to_easily_display_links_to_both_Pages_and_Categories_in_the_blog_navigation_header.3F

  5. becks-star
    Member
    Posted 1 year ago #

    Well, it could be a temporary workaround, but not the final solution :)
    I will try this later.

    Maybe i will edit my theme then, so i am not forced to use the custom menu stuff.

    Thank you

Topic Closed

This topic has been closed to new replies.

About this Topic