WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. mrwolfy
    Member
    Posted 4 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
    Member
    Posted 4 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.

    Peter

  3. mrwolfy
    Member
    Posted 4 years ago #

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

    wp_list_categories()

  4. mrwolfy
    Member
    Posted 4 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

Tags

No tags yet.