changing a page menu permalink, to link to a category (4 posts)

  1. mrwolfy
    Posted 5 years ago #

    Is it possible to change the Permalink of a page menu link? Completely so that it links to something other than a page, like a category?

    I like the style of the top menu. But I would like to link to categories instead of actual pages, while still keeping "home" a page, and being able to add links to other pages dynamically.

  2. Peter Boosten
    Posted 5 years ago #

    In about 11 out of 10 times the navigation is an unordered list, in you case probably created by a function called wp_list_pages(), first place to search is header.php. You could replace that by wp_list_categories(), or create your own own list entries all together. A mix is possible as well.


  3. mrwolfy
    Posted 5 years ago #

    that might work, thanks! Is there a way to exclude certain categories from this list?


  4. mrwolfy
    Posted 5 years ago #

    Never mind, as the pages in my menu have an exclusion argument, I just copied that. So now for my top menu, found in my header.php document I have replaced <?php wp_list_pages('exclude=131&title_li=' ); ?> with

    <?php wp_list_categories('exclude=5,3&title_li=') ; ?>

    this excludes categories 5 and 3, and also the title "Categories".

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.