我使用了212自定义主题(palumariosrl.it),但我有一个问题。如果我尝试在响应模式下使用菜单不起作用(我只能看到悬停菜单页面,如果我单击菜单按钮,我会出现错误404!)
我试图删除custo菜单样式,但没有解决问题。我试图删除关于wpml的函数,但没有解决任何问题。
//WPML Custom
add_filter( \'genesis_nav_items\' , \'flags_selector\' , 10 , 2 );
add_filter( \'wp_nav_menu_items\' , \'flags_selector\' , 10 , 2 );
function flags_selector($menu, $args){
$args = (array)$args;
$flags = \'\';
if ( $args[\'theme_location\'] != \'primary\' )
return $menu;
$lang = icl_get_languages(\'skip_missing=0&orderby=code\');
if( !empty($lang) ) {
$flags .= \'<div id="flags-selector">\';
foreach( $lang as $l ) {
$flags .= \'<div class="flag-item">\';
if( !$l[\'active\'] )
$flags .= \'<a href="\' . $l[\'url\']. \'">\';
$flags .= \'<img src="\'. $l[\'country_flag_url\']
. \'" height="12" alt="\' . $l[\'language_code\']
. \'" width="18" title="\' . $l[\'translated_name\']
. \'" />\';
if ( !$l[\'active\'] )
$flags .= \'</a>\';
$flags .= \'</div>\';
}
$flags .= \'</div>\';
}
return $menu . $flags;
}
我尝试删除关于菜单的自定义css,但没有任何更改:
/*-----------------
NAVIGATION MODS
-------------------*/
.main-navigation {/* move menu right and up */
margin-top: -40px;
margin-top: -3rem;
float: right;
}
.main-navigation li {
margin-top: -40px;
margin-top: -1rem;
}
.main-navigation a:hover {
color: #AF9F5D;
}
a:hover {
color: #AF9F5D;
}
.main-navigation .assistive-text:focus {
color: #AF9F5D;
}
.main-navigation ul.nav-menu,
.main-navigation div.nav-menu > ul {
border-bottom:0;
border-top:0;
}
.main-navigation li a {
font-family: \'Dosis\', sans-serif;
font-size: 15px;
border-bottom: 0;
color: #a8a8a8;
line-height: 3.692307692;
text-transform: uppercase;
white-space: nowrap;
}
.main-navigation li a:hover {
color: #AF9F5D;
}
.main-navigation li ul li a:hover {
background: #4c4c4c;
color: #ccc;
}
.main-navigation li ul li a {
background: #3a3a3a;
border-bottom: 1px solid #897C45;
display: block;
font-size: 11px;
font-size: 0.785714286rem;
line-height: 2.181818182;
padding: 8px 10px;
padding: 0.571428571rem 0.714285714rem;
width: 180px;
width: 12.85714286rem;
white-space: normal;
}
.main-navigation a {/*change menu title color*/
color: #A8A8A8;
}
.entry-content img,
.comment-content img,
.widget img,
img.header-image,
img.wp-post-image {/* remove border lines from menu */
border-radius:15px;
box-shadow:0 0 0 rgba(0,0,0,0);
}
.main-navigation .current-menu-item > a,
.main-navigation .current-menu-ancestor > a,
.main-navigation .current_page_item > a,
.main-navigation .current_page_ancestor > a {/* active menu link color */
color: #897C45;
}
我尝试禁用转换插件,但没有解决问题。如果我使用defoult主题,那么问题不会出现任何问题,但是whit child主题如果我单击responsive上的菜单按钮,则会出现404错误,并且此url
http://palumariosrl.it/%20%3C/a%3E%3C/h1%3E%3Ch2%20class=
这是我的标题。php
<?php
/**
* The Header template for our theme
*
* Displays all of the <head> section and everything up till <div id="main">
*
* @package WordPress
* @subpackage Twenty_Twelve
* @since Twenty Twelve 1.0
*/
?><!DOCTYPE html>
<!--[if IE 7]>
<html class="ie ie7" <?php language_attributes(); ?>>
<![endif]-->
<!--[if IE 8]>
<html class="ie ie8" <?php language_attributes(); ?>>
<![endif]-->
<!--[if !(IE 7) & !(IE 8)]><!-->
<html <?php language_attributes(); ?>>
<!--<![endif]-->
<head>
<meta charset="<?php bloginfo( \'charset\' ); ?>" />
<meta name="viewport" content="width=device-width" />
<title><?php wp_title( \'|\', true, \'right\' ); ?></title>
<link rel="profile" href="http://gmpg.org/xfn/11" />
<link rel="pingback" href="<?php bloginfo( \'pingback_url\' ); ?>" />
<?php // Loads HTML5 JavaScript file to add support for HTML5 elements in older IE versions. ?>
<!--[if lt IE 9]>
<script src="<?php echo get_template_directory_uri(); ?>/js/html5.js" type="text/javascript"></script>
<![endif]-->
<?php wp_head(); ?>
<link href=\'http://fonts.googleapis.com/css?family=Dosis\' rel=\'stylesheet\' type=\'text/css\'>
<link href=\'http://fonts.googleapis.com/css?family=Ropa+Sans\' rel=\'stylesheet\' type=\'text/css\'>
<!--LightBox Effect-->
<script type="text/javascript" src="<?php echo get_stylesheet_directory_uri(); ?>/js/jquery-1.11.0.min.js"></script>
<script type="text/javascript" src="<?php echo get_stylesheet_directory_uri(); ?>/js/lightbox.min.js"></script>
<link rel="stylesheet" type="text/css" href="<?php echo get_stylesheet_directory_uri(); ?>/css/lightbox.css" rel="stylesheet" />
<?php if (get_the_title()==\'Home\') { ?>
<style type="text/css">
footer[role="contentinfo"]{
border-top: 0 none;
clear: both;
font-size: 0.857143rem;
line-height: 2;
margin-left: auto;
margin-right: auto;
margin-top: 35.7143rem;
max-width: 68.5714rem;
padding: 1.71429rem 0;
}
</style>
<?php } ?>
</head>
<body <?php body_class(); ?>>
<div id="fullscreen"></div>
<div id="page" class="hfeed site">
<header id="masthead" class="site-header" role="banner">
<hgroup>
<div class="logo"><a href="<?php echo esc_url( home_url( \'/\' ) ); ?>">
<img src="http://palumariosrl.it/wp-content/uploads/logo.png" alt="Palu Mario Srl" title="Lavorazione legno massello" width="250px" height="64px"></a> </div>
<h1 class="site-title"><a href="<?php echo esc_url( home_url( \'/\' ) ); ?> </a></h1>
<h2 class="site-description"><?php bloginfo( \'description\' ); ?></h2>
</hgroup>
<nav id="site-navigation" class="main-navigation" role="navigation">
<button class="menu-toggle"><?php _e( \'Menu\', \'twentytwelve\' ); ?></button>
<a class="assistive-text" href="#content" title="<?php esc_attr_e( \'Skip to content\', \'twentytwelve\' ); ?>"><?php _e( \'Skip to content\', \'twentytwelve\' ); ?></a>
<?php wp_nav_menu( array( \'theme_location\' => \'primary\', \'menu_class\' => \'nav-menu\' ) ); ?>
</nav><!-- #site-navigation -->
<?php if ( get_header_image() ) : ?>
<a href="<?php echo esc_url( home_url( \'/\' ) ); ?>"><img src="<?php header_image(); ?>" class="header-image" width="<?php echo get_custom_header()->width; ?>" height="<?php echo get_custom_header()->height; ?>" alt="<?php echo esc_attr( get_bloginfo( \'name\', \'display\' ) ); ?>" /></a>
<?php endif; ?>
</header><!-- #masthead -->
<div id="main" class="wrapper">
我看不出手机菜单有什么问题。我看着老问题,但什么也解决不了我的问题。有什么想法吗?
您好,谢谢您的回复。代码是12的defout代码。
所以如果我改变<?php echo esc_url( home_url( \'/\' ) ); ?>
具有<?php get_site_url(); ?>
问题依然存在。
我已经删除了3点,没有必要删除2点。但问题依然存在。所以,如果您可以在无屏幕px上看到网站,如果您尝试单击菜单按钮,您将进入404页。