• Hi all,

    A simple question, i just cannot find anything on the internet guiding me to the right direction. Alot has been written about walkers, wp_nav_menu but nothing this specific.

    This is what im trying to achieve with the main menu:

    – home ( page )
    – about ( page )
    – projects ( link to category page ‘project’ )
    – project 1 ( post from category ‘project’ )
    – project 2 ( post from category ‘project’ )
    – project 3 ( post from category ‘project’ )
    – contact ( page )

    all this wrapped in the correct ul / li (sub)tags.

    please it would be great if somebody could guide me in the right direction

    thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • On the Admin side, go Appearance -> Menus and see if your current theme supports a custom menu. If so, you can easily use the tools there to create a custom menu, assign it to the main menu spot for your theme and accomplish what you want.

    You can get the links for your category specific page and your individual posts to create link-type menu items for the custom menu from the front end.

    The custom menu approach is by far the easiest I can think of; there are others.

    If your theme doesn’t support custom menus, you’re going to need to resort to another method if you don’t want to change themes.

    Thread Starter dnspn

    (@dnspn)

    I’ve made a theme from scratch. Thats why i need to know how to do it from the templating side.

    Maybe its possible to create a function that searches posts in category and links it to a nav menu name?

    Why not just add custom menu capability to the theme you’re building using wp_nav_menu?

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

The topic ‘Adding posts from one category to main menu’ is closed to new replies.