WordPress.org

Support

Support » Themes and Templates » [Resolved] Editing The Header To Show Only One Page

[Resolved] Editing The Header To Show Only One Page

  • Hi guys,

    My site http://essentiallinux.org has the Hi-tech theme in use. I want to stop every page but the “Contact Me” page displaying in the header as they are already listed in the sidebar (which is where I want them to be). So I looked in the code for header.php and it looks like it’s using an array of wp_pages or something similar to create a list of pages to be put in the header.

    My PHP knowledge is limited at best so does anyone know how to fix it so I can just show Page ID – 2?? (The Contact Me Page)

    I have included the section of code from my header.php if that helps.

    Thanks

    John

    <div id="HEAD">
    <div class="Wrapper">
    	<div id="SEARCH">
    		<?php include (TEMPLATEPATH . '/searchform.php'); ?>
    	</div>
    	<div id="TOPNAV">
    		<ul>
    			<?php wp_list_pages('title_li=' ); ?>
    		</ul>
    	</div>
    	<div class="Visual">
    		<h1><span><a href="<?php echo get_option('home'); ?>/"><?php bloginfo('name'); ?></a><br/><b><?php bloginfo('description'); ?></b></span></h1>
    	</div>
    </div>
    </div>
Viewing 2 replies - 1 through 2 (of 2 total)
  • Change like this
    wp_list_pages(‘include=2&title_li=’ );
    If you want show 2, 4, 8 etc. you can use this code like,
    wp_list_pages(‘include=2,4,8&title_li=’ );

    thank you so much for your prompt reply. as you can see from my site it has worked perfectly.

    many thanks yakuphan 🙂

    -J

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Resolved] Editing The Header To Show Only One Page’ is closed to new replies.
Skip to toolbar