Forums

Making new pages appear in top navigation (4 posts)

  1. virg
    Member
    Posted 3 years ago #

    Hello! I recently purchased this theme http://www.revolutioncore.com/demo/crisp/ and have been trying to modify something but I can't figure out how..

    I would just like new pages to appear in the top navigation instead of the built in pages and categories. Like they would in the default WP theme. Please help me as I have no more ideas on how make this function..

  2. MichaelH
    Member
    Posted 3 years ago #

    The template tag, wp_list_pages(), is typically used by theme designers to display Pages in a nav bar. With the help of the Template Hierarchy article, determine what Template is displaying your Pages (probably header.php), then look for wp_list_pages and see if an exclude=x or include=x is limiting the Pages displayed.

  3. virg
    Member
    Posted 3 years ago #

    Thanks for the link! I tried some techniques but my theme's header.php has a navbar but it contains some confusing code. Whenever I add a new page, it doesn't appear, links back to home or some strange behavior. It's using a "?php echo $crisp" which I suspect isn't letting me customize. Here's a copy of the header code, I'm trying to figure out I need to erase.. I keep messing up the theme trying new things.

    <?php
    /**
     * @Crisp header
     */
    ?>
    <!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 wp_title('&laquo;', true, 'right'); ?> <?php bloginfo('name'); ?></title>
    
    	<style type="text/css" media="screen">
    		@import url( <?php bloginfo('stylesheet_url'); ?> );
    	</style>
    
    <?php // Get the user choices for the theme.
    global $options;
    foreach ($options as $value) {
    	if (get_settings( $value['id'] ) === FALSE) { $$value['id'] = $value['std']; } else { $$value['id'] = get_settings( $value['id'] ); }
    }
    ?>
    	<!-- Check which theme needs to be loaded and set the sylesheet to it. And the Logo -->
    	<!-- For every additional theme add a line similar to the one below. Also you need to include it in the functions.php -->
    	<!-- If you're replacing a color, then just replace and customize no need to add an adittional line -->
    	<?php if ($crisp_theme=="Blue theme") {$stylefile="blue-theme.css";$logo="/images/logo.jpg";} ?>
    	<?php if ($crisp_theme=="Orange theme") {$stylefile="orange-theme.css";$logo="/images/orange/logo.jpg";} ?>
    	<?php if ($crisp_theme=="Brown Blue theme") {$stylefile="bblue-theme.css";$logo="/images/bblue/logo.jpg";} ?>
    	<?php if (!isSet($crisp_theme)) {$stylefile="blue-theme.css";$logo="/images/logo.jpg";} ?>
    
    	<!-- Load Menu -->
    	<link rel="stylesheet" href="<?php bloginfo('stylesheet_directory'); ?>/css/dropmenu.css" type="text/css" media="screen, projection"/>
    	<!-- JFLOW CSS -->
    	<link href="<?php bloginfo('stylesheet_directory'); ?>/css/jflow.css" rel="stylesheet" type="text/css" />
    
    	<!-- Load the Sylesheet -->
    	<link rel="stylesheet" href="<?php bloginfo('stylesheet_directory'); ?>/css/<?php echo $stylefile; ?>" type="text/css" media="screen" />
    
    	<!-- JQUERY Library -->
    	<script type="text/javascript" src="<?php bloginfo('stylesheet_directory'); ?>/js/jquery.js"></script>
    	<!-- JFLOW functions -->
    	<script type="text/javascript" src="<?php bloginfo('stylesheet_directory'); ?>/js/jquery.flow.1.2.js"></script>
    
    	<!-- Lightbox Script -->
    	<script type="text/javascript" src="<?php bloginfo('stylesheet_directory'); ?>/js/jquery.lightbox-0.5.js"></script>
    	<!-- Lightbox CSS -->
    	<link rel="stylesheet" type="text/css" href="<?php bloginfo('stylesheet_directory'); ?>/css/jquery.lightbox-0.5.css" media="screen" />
    
    	<!-- The menu hover effect -->
    	<script type="text/javascript" src="<?php bloginfo('stylesheet_directory'); ?>/js/hoverIntent.js"></script>
    	<!-- Fade effect -->
    	<script type="text/javascript" src="<?php bloginfo('stylesheet_directory'); ?>/js/fadeinout.js"></script>
    	<!-- Drop down menu -->
    	<script type="text/javascript" src="<?php bloginfo('stylesheet_directory'); ?>/js/jquery.dropdown.js"></script>
    
    		<!--[if lte IE 7]>
    			<link rel="stylesheet" type="text/css" href="<?php bloginfo('stylesheet_directory'); ?>/css/ie.css" media="screen" />
    		<![endif]-->
    
    	<link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="<?php bloginfo('rss2_url'); ?>" />
    	<link rel="alternate" type="text/xml" title="RSS .92" href="<?php bloginfo('rss_url'); ?>" />
    	<link rel="alternate" type="application/atom+xml" title="Atom 1.0" href="<?php bloginfo('atom_url'); ?>" />
    
    	<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
    	<?php wp_get_archives('type=monthly&format=link'); ?>
    	<?php //comments_popup_script(); // off by default ?>
    	<?php wp_head(); ?>
    
    </head>
    
    <body>
    <!-- The Home and Other Page Background picture switch -->
    <?php if (is_home()) { ?>
    <div id="thebody"> <!-- Background for the Homepage -->
    <?php } else {?>
    <div id="thebodysmallbg"> <!-- Background for the Rest -->
    <?php } ?>
    
    <div id="thepage">
    <!-- LOGO -->
    <div id="logo"><a href="<?php echo get_option('home'); ?>"><img src="<?php bloginfo('stylesheet_directory'); ?><?php echo $logo; ?>" alt="logo" /></a></div>
    
    	<div id="page-wrap">
    		<ul class="dropdown">
    				<!-- Top Main Navigation bar
    				     Edit below and enter the hyperlink for the page
    					For Page 	"?page_id=<Page_ID>"
    					For Cateogry	"?cat=<Cat_ID>"
    				-->
    				<li><a href="<?php echo get_option('home'); ?>/">Home</a></li>
    				<li><a href="<?php echo get_option('home'); ?>/?page_id=<?php echo $crisp_about_id; ?>">About</a></li>
    				<li><a href="<?php echo get_option('home'); ?>/?cat=<?php echo $crisp_portfolio_id; ?>">Portfolio</a>
    				<?php //START OF DROP DOWN MENU CODE  If you don't want sub categories then delete this 
    
    				if ($crisp_portfolio_id<>""){
    					print ("<ul id=\"sub_menu\">");
    
    					//This is where the subcategory is pulled down
    					 $categories = wp_list_categories('echo=0&child_of='.$crisp_portfolio_id.'&title_li=&sort_column=menu_order');
    					 $categories = preg_replace('/title=\"(.*?)\"/','',$categories);  // Get rid of href Titles in the menu. A Distraction
    					 echo $categories;  
    
    					print ("</ul>");
    				}
    				//END OF DROP DOWN MENU CODE ?>
    
    				</li>
    				<li><a href="<?php echo get_option('home'); ?>/?cat=<?php echo $crisp_blog_id; ?>">Blog</a></li>
    				<li><a href="<?php echo get_option('home'); ?>/?page_id=<?php echo $crisp_contact_id; ?>">Contact</a></li>
    			</ul>
    	</div>
    
    	<div class="clear"></div>
    
    <?php if (is_home()) { ?>
    <div id="top-padding"></div>
    <!-- Anything here will be displayed only in the main page -->
    <?php } else {?>
    <!-- Anything here will be displayed only in the pages other than the main page -->
    <?php } ?>
    
    <!-- end header -->
  4. MichaelH
    Member
    Posted 3 years ago #

    Well this looks like some of those

    <!-- Top Main Navigation bar
    				     Edit below and enter the hyperlink for the page
    					For Page 	"?page_id=<Page_ID>"
    					For Cateogry	"?cat=<Cat_ID>"
    				-->
    				<li><a href="<?php echo get_option('home'); ?>/">Home</a></li>
    				<li><a href="<?php echo get_option('home'); ?>/?page_id=<?php echo $crisp_about_id; ?>">About</a></li>
    				<li><a href="<?php echo get_option('home'); ?>/?cat=<?php echo $crisp_portfolio_id; ?>">Portfolio</a>

    You might ask the theme author about using wp_list_pages there.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.