Support » Themes and Templates » AndyBlue…Removing pages from top header

  • Resolved humbleopinion

    (@humbleopinion)


    I am using AndyBlue and would like to remove the pages from the top of the page. I only want them listed on the side bar. Or is there a way to have specific pages listed under the header.

    Thanks in advance!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The pages list in the header is created by this chunk of code:

    <div id="navigation">
    <li class="selected"><a href="<?php">>Home</a>
    <?php wp_list_pages('sort_column=menu_order&depth=1&title_li='); ?>
    </div>

    It can be found in the file “header.php”. Go to the editor in your admin panel (it’s under “Appearance” in the sidebar), and find the file in the list on the side of the page. The code is at the very end of the file.

    Now, there are a bunch of options for the template tag that makes the list, which can be found here. Or you can remove the list by putting comment brackets around the code. One in front like this:

    <!--

    And one at the end like this:

    -->

    And when you’re done it should look like this:

    <!--
    
    <div id="navigation">
    
    <li class="selected"><a href="<?php">>Home</a>
    
    <?php wp_list_pages('sort_column=menu_order&depth=1&title_li='); ?>
    
    </div>
    
    -->

    I hope that helps.

    Moderator Mark Ratledge

    (@songdogtech)

    Forum Moderator

    Might be easier to use a plugin like Exclude Pages « WordPress Plugins so you don’t have to modify theme source. That plugin gives a tick box in the page editor to exclude any page from the main navigation produced by wp_list_pages.

    It’s generally better to change a theme source rather than add a plugin, especially for something as simple as excluding a page.

    While it’s easier to go into WordPress admin to make changes, it takes more time to install a plug-in, takes up more space on the server (however minuscule), and can cause conflicts with other plug-ins.

    It boils down to personal preference, if you’re in the process of learning one or the other: learn to be more plug-in independent.

    Moderator Mark Ratledge

    (@songdogtech)

    Forum Moderator

    I user like humbleopinion – with four questions/threads in their profile – needs the easy way to do things, i.e. use a plugin, rather than diving into changing source.

    A plugin is definitely the better option for a novice, or someone just short on time. It will also allow you to keep the modifications it makes if you change the theme.

    I would have suggested one if it had occurred to me.

    Thanks elfortunawe! It worked! As for plugins, nothing but memory users. I don’t like them and the less I have, the smoother the site!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘AndyBlue…Removing pages from top header’ is closed to new replies.