我安装了一个名为的插件Translator Box,我使用它的短代码并将其放入我的wordpress主题header.php.
[translation_box languages="english,russian,german,spanish,french,chinese" width="100%" height="200px" bgcolor="white" txtcolor="#000000"]
Run Code Online (Sandbox Code Playgroud)
但是不起作用!
它还在窗口小部件的"已启用"窗口小部件中生成窗口小部件.有没有办法在header.php中使用一些可以调用小部件的代码?谢谢.
我的代码:
<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
<div class="posts" id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<h2>
<?php the_title(); ?>
</h2>
<div class="entry">
<?php the_content();?>
</div>
</div><!--post end-->
<?php endwhile; ?>
<?php else : ?>
<h3>no content</h3>
<?php endif; ?>
Run Code Online (Sandbox Code Playgroud)
我将代码放入我自定义的wordpress主题文件single.php中.为什么它不能输出帖子内容,它可以输出帖子标题.谢谢.