菜单在类别页面上消失 [英] Menu Disappears on Category Pages

查看:50
本文介绍了菜单在类别页面上消失的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

<!DOCTYPE html>
<!--[if IE 8]>          <html class="ie ie8" <?php language_attributes(); ?>> <![endif]-->
<!--[if IE 9]>          <html class="ie ie9" <?php language_attributes(); ?>> <![endif]-->
<!--[if gt IE 9]><!-->  <html <?php language_attributes(); ?>> <!--<![endif]-->

<head>
    <meta charset="<?php bloginfo( 'charset' ); ?>">
    <title><?php echo ( is_home() || is_front_page() ) ? bloginfo('name') : wp_title('| ', true, 'right'); ?></title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
    <?php wp_head(); ?>
</head>

<?php

    /**

     * Assign header class based on theme option

     * @todo Assign this in functions.php instead of inline

     */

    ( get_option('header_layout','standard') == 'standard' ) ? $header_class = '' : $header_class = 'header-top';

?>

<body <?php body_class( $header_class ); ?>>

    <div class="body">

        <?php

            /**

             * Get the header layout based on choice in theme options.

             */

            get_template_part( 'header/content', get_option('header_layout','standard') );











这是头文件的代码。



菜单显示在主页但不在类别页面






This is code of header file.

menu is showing in home page but not in category page

推荐答案

header_class =' '
header_class = '' :


header_class =' header-top' ;

>

< body < span class =code-attribute> <?php body_class(
header_class = 'header-top'; ?> <body <?php body_class(


header_class ); > >

< div class = body >

<? php

/ **

< span class =code-summarycomment> * 获取 header layout based 选择 主题 options。

* /

< span class =code-summarycomment> get_template_part( '标题/内容', get_option('header_layout','standard') );
header_class ); ?>> <div class="body"> <?php /** * Get the header layout based on choice in theme options. */ get_template_part( 'header/content', get_option('header_layout','standard') );











这是头文件的代码。



菜单显示在主页但不在类别页面






This is code of header file.

menu is showing in home page but not in category page


这篇关于菜单在类别页面上消失的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆