WordPress.org

Support

Support » Themes and Templates » How to remove pages from header?

How to remove pages from header?

  • Hi all, I’m trying to make some changes to the Musical Blog theme as a backup to using Benevolence.

    I’m using the pages widget but it is displaying my page names at the top of the blog in the header as well as in the sidebar. I’d like the pages to only appear in the sidebar really so is there a way of disabling them in the header?

    Quite new to all this so any (hopefully easy to understand) advice appreciated.

Viewing 8 replies - 1 through 8 (of 8 total)
  • I am guessing there is a call to wp_list_page() in the header.php file of your theme. Remove that and it should not display a list of pages in the header. However without seeing the theme I cannot say for certain.

    Thanks for the reply, there is no wp_list_page in my header.php file that I can see. Anything else I could try, the code is below from the header file.

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>
    
    <head profile="http://gmpg.org/xfn/11">
    <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
    
    <title><?php bloginfo('name'); ?> <?php if ( is_single() ) { ?> &raquo; Blog Archive <?php } ?> <?php wp_title(); ?></title>
    
    <meta name="generator" content="WordPress <?php bloginfo('version'); ?>" /> <!-- leave this for stats -->
    
    <link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" />
    <link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> RSS Feed" href="<?php bloginfo('rss2_url'); ?>" />
    <link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
    <script type="text/javascript" src="<?php bloginfo('template_url'); ?>/script.js"></script>
    <?php wp_head(); ?>
    </head>
    <body>
    <div class="PageBackgroundGlare"><div class="PageBackgroundGlareImage"></div></div>
    <div class="Main">
    
    <div class="Sheet">
      <div class="Sheet-body">
    <div class="nav">
    <ul class="menu">
    <?php art_menu_items(true); ?>
    </ul>
    <div class="l"></div><div class="r"><div></div></div></div><div class="Header">
      <div>
    <table class="logo">
    <tr><td class="logo-name"><a href="<?php echo get_option('home'); ?>/"><?php bloginfo('name'); ?></a></td></tr>
    <tr><td class="logo-text"><?php bloginfo('description'); ?></td></tr>
    </table>
    
      </div>
    </div>

    You can see the blog itself here.

    Delete this bit

    <ul class="menu">
    <?php art_menu_items(true); ?>
    </ul>

    That may well do the trick

    And they are gone!! Thank you very much 😀

    Won’t be long before I’m stuck on something else lol. Actually, is there any code I can replace that with to insert an image there?

    Just replace this image with the same name and the same width, in the same location with the one your want.

    http://www.richardpeters.co.uk/blog/wp-content/themes/music/images/nav.png

    Many thanks 🙂

    Also had the same problem.

    But mine is that, the menu is still appearing.

    <!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
    <html xmlns=”http://www.w3.org/1999/xhtml” <?php language_attributes(); ?>>

    <head profile=”http://gmpg.org/xfn/11″>
    <meta http-equiv=”Content-Type” content=”<?php bloginfo(‘html_type’); ?>; charset=<?php bloginfo(‘charset’); ?>” />

    <title><?php bloginfo(‘name’); ?> <?php if ( is_single() ) { ?> » Blog Archive <?php } ?> <?php wp_title(); ?></title>

    <meta name=”generator” content=”WordPress <?php bloginfo(‘version’); ?>” /> <!– leave this for stats –>

    <link rel=”stylesheet” href=”<?php bloginfo(‘stylesheet_url’); ?>” type=”text/css” media=”screen” />
    <link rel=”alternate” type=”application/rss+xml” title=”<?php bloginfo(‘name’); ?> RSS Feed” href=”<?php bloginfo(‘rss2_url’); ?>” />
    <link rel=”pingback” href=”<?php bloginfo(‘pingback_url’); ?>” />
    <script type=”text/javascript” src=”<?php bloginfo(‘template_url’); ?>/script.js”></script>
    <?php wp_head(); ?>
    </head>
    <body>
    <div class=”PageBackgroundGlare”><div class=”PageBackgroundGlareImage”></div></div>
    <div class=”Main”>

    <div class=”Sheet”>
    <div class=”Sheet-body”>
    <div class=”nav”>

    <div class=”l”></div><div class=”r”><div></div></div></div><div class=”Header”>
    <div>
    <table class=”logo”>
    <tr><td class=”logo-name”>/”><?php bloginfo(‘name’); ?></td></tr>
    <tr><td class=”logo-text”><?php bloginfo(‘description’); ?></td></tr>
    </table>

    </div>
    </div>

    I have paste here what I have save and look on my site. the menus is still present.

    By the way the site is http://www.ipodsdiscount.com/

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘How to remove pages from header?’ is closed to new replies.
Skip to toolbar