我在WordPress网站fabzar.com上的菜单出错,它在首页显示正确,但是当您点击其中一个产品时,菜单会更改并选择页面名称
你知道是什么原因以及如何解决这个问题
提前致谢
继承人头部代码。 >
<title>
<?php
wp_title( ' ', true );
?>
</title>
<link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo( 'stylesheet_url' ); ?>" />
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
<?php wp_enqueue_script("jquery"); ?>
<?php
wp_head();
?>
<?php do_action('PricerrTheme_before_head_tag_open'); ?>
<script type="text/javascript" src="<?php echo get_bloginfo('template_url'); ?>/js/my-script.js"></script>
<!-- ########################################### -->
<script type="text/javascript">
function suggest(inputString){
if(inputString.length == 0) {
$('#suggestions').fadeOut();
} else {
$('#big-search').addClass('load');
$.post("<?php bloginfo('siteurl'); ?>/wp-admin/admin-ajax.php?action=autosuggest_it", {queryString: ""+inputString+""}, function(data){
if(data.length >0) {
var stringa = data.charAt(data.length-1);
if(stringa == '0') data = data.slice(0, -1);
else data = data.slice(0, -2);
$('#suggestions').fadeIn();
$('#suggestionsList').html(data);
$('#big-search').removeClass('load');
}
});
}
}
function fill(thisValue) {
$('#big-search').val(thisValue);
setTimeout("$('#suggestions').fadeOut();", 600);
}
$(document).ready(function(){
$(".expnd_col").click(function() {
var rels = $(this).attr('rel');
$("#term_submenu" + rels).toggle();
return false;
});
</script>
<?php
$PricerrTheme_color_for_footer = get_option('PricerrTheme_color_for_footer');
if(!empty($PricerrTheme_color_for_footer))
{
echo '<style> #footer { background:#'.$PricerrTheme_color_for_footer.' }</style>';
}
$PricerrTheme_color_for_bk = get_option('PricerrTheme_color_for_bk');
if(!empty($PricerrTheme_color_for_bk))
{
echo '<style> body { background:#'.$PricerrTheme_color_for_bk.' }</style>';
}
$PricerrTheme_color_for_top_links = get_option('PricerrTheme_color_for_top_links');
if(!empty($PricerrTheme_color_for_top_links))
{
echo '<style> .top-links { background:#'.$PricerrTheme_color_for_top_links.' }</style>';
}
//----------------------
$PricerrTheme_home_page_layout = get_option('PricerrTheme_home_page_layout');
if(PricerrTheme_is_home()):
if($PricerrTheme_home_page_layout == "4"):
echo '<style>#content { float:right } #right-sidebar { float:left; }</style>';
endif;
if($PricerrTheme_home_page_layout == "5"):
echo '<style>#content { width:100%; } .main-how-it-works{ width:100% }</style>';
endif;
if($PricerrTheme_home_page_layout == "3"):
echo '<style>#content { width:520px } .title_holder { width:385px; } #left-sidebar{ margin-right:15px;}
.main-how-it-works { width:520px; } .i_will_mainbox{ width:240px } .how-does-it-work-btn { top:30% }</style>';
endif;
if($PricerrTheme_home_page_layout == "2"):
echo '<style>#content { width:520px } #left-sidebar{ float:right } #left-sidebar{ margin-right:15px; } .title_holder { width:385px; }
.main-how-it-works { width:520px; } .i_will_mainbox{ width:240px } .how-does-it-work-btn { top:30% }</style>';
endif;
endif;
?>
<!-- ########################################## -->
</head>
<body <?php body_class(); ?> >
<div id="my_container">
<div class="main_links">
<div class="top-links">
<?php
if(is_user_logged_in())
{
global $current_user;
get_currentuserinfo();
echo '<a href="'.PricerrTheme_my_account_link().'">';
echo sprintf(__('Welcome, %s', 'PricerrTheme'), $current_user->user_login );
echo '</a>';
}
if(current_user_can('manage_options')) {?> <a href="<?php bloginfo('siteurl'); ?>/wp-admin"><?php echo __("Wp-Admin"); ?></a> <?php }
?>
<a href="<?php bloginfo('siteurl') ?>"><?php echo __("Home","PricerrTheme"); ?></a>
<a href="<?php echo PricerrTheme_post_new_link(); ?>"><?php echo __("Post New","PricerrTheme"); ?></a>
<?php if(get_option('PricerrTheme_enable_blog') != "no") { ?>
<a href="<?php echo PricerrTheme_blog_link(); ?>"><?php echo __("Blog","PricerrTheme"); ?></a>
<?php } ?>
<?php
$menu_name = 'Pricerr_top_menu_header';
if ( ( $locations = get_nav_menu_locations() ) && isset( $locations[ $menu_name ] ) ) {
$menu = wp_get_nav_menu_object( $locations[ $menu_name ] );
$menu_items = wp_get_nav_menu_items($menu->term_id);
foreach ( (array) $menu_items as $key => $menu_item ) {
$title = $menu_item->title;
$url = $menu_item->url;
if(!empty($title))
echo '<a href="' . $url . '">' . $title . '</a> ';
}
}
?>
<?php
if(is_user_logged_in())
{
$uid = $current_user->ID;
$pricerrTheme_get_unread_number_messages = pricerrTheme_get_unread_number_messages($uid);
if($pricerrTheme_get_unread_number_messages > 0) $sk = ' <span class="the_one_mess">'.$pricerrTheme_get_unread_number_messages.'</span>';
else $sk = '';
?>
<a href="<?php echo PricerrTheme_my_account_link(); ?>"><?php echo sprintf(__("MyAccount %s","PricerrTheme"), $sk); ?></a>
<a href="<?php echo wp_logout_url(); ?>"><?php echo __("Log Out","PricerrTheme"); ?></a>
<?php
}
else
{
?>
<a href="<?php bloginfo('siteurl') ?>/wp-login.php?action=register"><?php echo __("Register","PricerrTheme"); ?></a>
<a href="<?php bloginfo('siteurl') ?>/wp-login.php"><?php echo __("Log In","PricerrTheme"); ?></a>
<?php } ?>
<a href="<?php bloginfo('siteurl'); ?>/?feed=rss2&post_type=job"><img src="<?php bloginfo('template_url'); ?>/images/rss_icon.png"
border="0" width="19" height="19" alt="rss icon" /></a>
</div>
</div>
<div id="header">
<div class="middle-header-bg">
<div class="middle-header" id="middle-header-id">
<?php
$logo = get_option('PricerrTheme_logo_url');
if(empty($logo)) $logo = get_bloginfo('template_url').'/images/logo.png';
?>
<a href="<?php bloginfo('siteurl'); ?>"><img id="logo" src="<?php echo $logo; ?>" /></a>
<!-- ######### -->
<div class="search_box_main">
<?php
global $wp_query;
$query_vars = $wp_query->query_vars;
$job_category = $query_vars['job_category'];
if(empty($job_category)) $job_category = "all";
$job_sort = $query_vars['job_sort'];
$job_tax = $query_vars['job_tax'];
//----------
if(empty($job_category)) $job_category = "all";
if(empty($page)) $page = "1";
if(empty($job_sort)) $job_sort = "auto";
if(empty($job_tax)) $job_tax = "category";
$term_search = $query_vars['term_search'];
global $default_search;
?>
<div id="suggest" >
<form method="get" action="<?php bloginfo('siteurl'); ?>"> <input type="hidden" value="1" name="search_me_now" />
<div class="search_left">
<input type="text" onfocus="this.value=''" id="big-search" name="term" autocomplete="off" onkeyup="suggest(this.value);" value="<?php if(!empty($term_search)) echo htmlspecialchars($term_search);
else echo $default_search; ?>" /></div>
<div class="search_left">
<input type="image" width="29" id="big-search-submit" name="search_me" src="<?php bloginfo('template_url') ?>/images/search_icon.png" /></div>
</form>
<div class="suggestionsBox" id="suggestions" style="z-index:999;display: none;"> <img src="<?php echo get_bloginfo('template_url');?>/images/arrow.png" style="position: relative; top: -12px; left: 30px;" alt="upArrow" />
<div class="suggestionList" id="suggestionsList"> </div>
</div></div>
<!-- #############################-->
</div>
<?php uberMenu_easyIntegrate(); ?>
</div> <!-- middle-header-bg -->
</div> </div>
<div id="main">
如果发生了
,则会显示页面代码