Wordpress nav not visible in pages like articles, blog & search

Posted by kwek-kwek on Stack Overflow See other posts from Stack Overflow or by kwek-kwek
Published on 2010-04-08T14:11:17Z Indexed on 2010/04/08 14:13 UTC
Read the original article Hit count: 451

Filed under:
|
|
|

My wordpress*(a custom template)* nav is all working on all of the pages but now I found out that the Main nav doesn't show on this pages

All pages e.g. search.php, single.php, index.php, page.php all has <?php get_header(); ?>

I really don't know whats wrong.

Here is the code for my header.php

    <?php
/**
 * @package WordPress
 * @subpackage Default_Theme
 */
?>
<!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>
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
<title><?php bloginfo('name'); ?> <?php wp_title(); ?></title>
<link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen,projection" />
<link rel="stylesheet" href="<?php bloginfo('template_url'); ?>/css/sifr.css" type="text/css" />

<script src="<?php bloginfo('template_url'); ?>/js/sifr.js" type="text/javascript"></script>
<script src="<?php bloginfo('template_url'); ?>/js/sifr-config.js" type="text/javascript"></script>
<script src="http://cdn.jquerytools.org/1.1.2/jquery.tools.min.js"></script>

<?php wp_head(); ?>
</head>
<?php
 $current_page = $post->ID;
 $parent = 1;

 while($parent) {
  $page_query = $wpdb->get_row("SELECT post_name, post_parent FROM $wpdb->posts WHERE ID = '$current_page'");
  $parent = $current_page = $page_query->post_parent;
  if(!$parent) $parent_name = $page_query->post_name;
 }
?>
<body id="<?php echo (is_page()) ? "$parent_name" : ((is_home()) ? "blog" : ((is_search()) ? "other" : ((is_single()) ? "blog" : "blog"))); ?>">
<div id="BGtie">

<!--HEAD WRAPPER-->
<div id="headwrapper">

<!--HEADER-->
<div id="headContainer">

<div id="nameTag">
<a href="<?php echo get_option('home'); ?>/"><?php bloginfo('name'); ?></a>
</div>

<!--TOP NAV-->
<div id="topNav">
<ul>
<li><a href="<?php bloginfo('url'); ?>home">Home</a></li>
<li><a href="#">Request info</a></li>
<li><a href="#">Contact us</a></li>
<?php do_action('icl_language_selector'); ?>
</ul>


</div>
<!--END TOP NAV-->

<!--MAIN NAV-->
<?php if ( is_page() AND (strtolower(ICL_LANGUAGE_CODE) == 'fr') ) {include("main-nav-fr.php");} ?>
<?php if (is_page() AND (strtolower(ICL_LANGUAGE_CODE) == 'en')) include("main-nav-en.php") ?>
<!--END MAIN NAV-->

</div>
<!--END HEADER-->

</div>

<!--END HEAD WRAPPER-->
</div>

© Stack Overflow or respective owner

Related posts about Wordpress

Related posts about wordpress-theming