Forums

How can I have pages in my sidebar and not just in my header menu? (9 posts)

  1. fifthhouse
    Member
    Posted 3 years ago #

    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.

  2. curtismchale
    Member
    Posted 3 years ago #

    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.

  3. fifthhouse
    Member
    Posted 3 years ago #

    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?

  4. curtismchale
    Member
    Posted 3 years ago #

    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.

  5. fifthhouse
    Member
    Posted 3 years ago #

    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.

  6. Chrisber
    Member
    Posted 3 years ago #

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

  7. curtismchale
    Member
    Posted 3 years ago #

    @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.

  8. sanjaymenon
    Member
    Posted 3 years ago #

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

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

  9. moshu
    Member
    Posted 3 years ago #

    @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.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.