Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/242.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 主题模板中的mqTranslate代码_Php_Wordpress - Fatal编程技术网

Php 主题模板中的mqTranslate代码

Php 主题模板中的mqTranslate代码,php,wordpress,Php,Wordpress,试图查找mqtranslate相关的问题,但没有一个回答我的问题,因此我在这里提问 我尝试在WordPress标题中添加自定义菜单,而不是使用它自己的菜单,我安装了mqtranslate并添加代码来定义不同语言的菜单项名称。我发现无论我切换任何一种语言,都会显示两种语言的文本。下面是标题中的代码。我只用我的代码替换 <?php /* * Template Name: Custom Front Page (Debug use) */ ?> <!doctype html>

试图查找mqtranslate相关的问题,但没有一个回答我的问题,因此我在这里提问

我尝试在WordPress标题中添加自定义菜单,而不是使用它自己的菜单,我安装了mqtranslate并添加代码来定义不同语言的菜单项名称。我发现无论我切换任何一种语言,都会显示两种语言的文本。下面是标题中的代码。我只用我的代码替换

<?php
/*
 * Template Name: Custom Front Page (Debug use)
 */
?>
<!doctype html>
<!--[if IE 8]> <html class="no-js lt-ie9" <?php language_attributes(); ?>> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" <?php language_attributes(); ?>> <!--<![endif]-->
<head>

    <meta charset="utf-8">
    <title><?php ci_e_title(); ?></title>
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <?php // JS files are loaded via /functions/scripts.php ?>

    <?php // CSS files are loaded via /functions/styles.php ?>

    <?php wp_head(); ?>

</head>

<body <?php body_class(); ?>>
<?php do_action('after_open_body_tag'); ?>

<?php
if ( !is_page_template('template-front.php') ) {
    echo '<div id="bg"></div>';
}
?>

<div id="page">
    <header id="header" class="row">
        <div class="twelve columns">
            <div class="wrap">
                <div class="row">
                    <div class="three columns">
                        <div id="logo" class="<?php logo_class(); ?>">
                            <?php ci_e_logo('<h1>', '</h1>'); ?>
                        </div>
                    </div>

                    <div class="nine columns">
                        <nav id="hoz-menu">
                            <ul id="hoz-menu" class="topmenu">
                                <li class="topfirst"><a href="javascript:void()" style="height:32px;line-height:32px;"><span><!--:cn-->Simplified Chinese text here<!--:--><!--:tw-->Traditional Chinese test here<!--:--></span></a>


通过调用php函数

_e(“此处简体中文文本,此处繁体中文测试”)


<div class="nine columns">
                        <nav id="hoz-menu">
                            <ul id="hoz-menu" class="topmenu">
                                <li class="topfirst"><a href="javascript:void()" style="height:32px;line-height:32px;"><span>**<?php _e("<!--:cn-->Simplified Chinese text here<!--:--><!--:tw-->Traditional Chinese test here<!--:-->"); ?>**</span></a>