Forums

[resolved] Modify navbar to link to both pages and categories directly (5 posts)

  1. WMS Group
    Member
    Posted 2 years ago #

    I am using the basicpress theme for my client's website. The navbar at the top uses pages and automatically creates new links once I have made a new page. I would like to have one link in particular link to a category archive listing with thumbnails.

    I have used Sobeks Posts in Category plugin to allow me to list posts on a page, but I do not want them to display as links.

    Here is how the link to the page works now:
    http://test.hatc.org/?page_id=150

    I would like it to display results like this:
    http://test.hatc.org/?cat=3

    Does anyone have any ideas on how I might achieve this?

    Thanks!

  2. Micah Cooksey
    Moderator
    Posted 2 years ago #

    In your theme's header.php file where it says <?php wp_list_pages(); ?> and insert <?php wp_list_categories(); ?> directly after (or before, depending on where you want it to appear) it.

    More on wp_list_categories here: http://codex.wordpress.org/Template_Tags/wp_list_categories

  3. MichaelH
    Volunteer
    Posted 2 years ago #

  4. Micah Cooksey
    Moderator
    Posted 2 years ago #

    Good point, I've used that plugin for other purposes, but not for categories.
    That'd be much simpler.

  5. WMS Group
    Member
    Posted 2 years ago #

    Thanks to you both ;) I did find that the page links to plugin was the easiest solution. Much appreciated!

Topic Closed

This topic has been closed to new replies.

About this Topic