Support » Themes and Templates » How can I have pages in my sidebar and not just in my header menu?

  • The template I’m using lists pages in the header menu, but I want to have specific pages that are displayed only in the sidebar.

    Any help offered would be much appreciated.

Viewing 8 replies - 1 through 8 (of 8 total)
  • You need to remove the HTML in the header that lists the pages. If you place a link to your site on the forum we can look at the code and tell you what it is.

    For pages in the sidebar look at the widgets and add the pages widget to your sidebar. A note, this often wipes out all of the other stuff in the sidebar so you will have to add the widgets for everything you want in the sidebar.

    Thanks very much for this tip. A question I have is whether or not I can create pages that ONLY appear in the sidebar menu, while the others will only appear in the header menu.

    Do you know?

    yes you can do this. it does create some manual coding. if you’re hoping to use WP like a full CMS and only display the child pages of a parent or if you just want to exclude or include certain pages check this out in the codex.

    Thanks very much once again. I found a plugin page-link-manager which looks like I can use. I just create pages and choose them to not appear in the menu, and then I insert the url for those pages in my sidebar.php file. It works great.

    Sometimes the simple solution is best. I just create html links in a text widget.

    @chrisber I think most often simple is the best way. Managing the updates of plugins is a PITA often so I try to use as few as possible.

    just add the following code in ur sidebar.php file :

    <?php wp_list_pages(‘title_li=<h2>Pages</h2>’ ); ?>

    @sanjeymenon,
    What new information did you bring in compared to curtismchale’s post above, which pointed to the detailed description of that template tag? If you don’t have anything to add – don’t post.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘How can I have pages in my sidebar and not just in my header menu?’ is closed to new replies.