2010-06-27 38 views
0

即时通讯使用WordPress 3.0的位置:WordPress的不打印标题,如果没有循环

http://www.adventure-service.com

主页上我使用的创建内容,而WordPress的循环模板。

但接触网页上我使用的循环:

<?php get_header(); ?> 
      <div id='content'> 
       <?php get_template_part('loop'); ?> 
      </div> 
<?php get_footer(); ?> 

OFC上的联系页面标题的作品就好了。

不知道该怎么办?什么代码展示给你?在header.php中我有这样的标题:

<title><?php wp_title('| adventure-service.com', true, 'right'); ?></title> 

回答

3

这是无关的循环,wp_title始终是空的该网站的首页。这就是为什么Wordpress codex鼓励您在标题中包含博客名称的原因。在你的情况下,你可能想做类似这样的事情(在将你的博客名称设置为'adventure-service.com'后):

<title><?php wp_title(' | ', true, 'right'); ?><?php bloginfo('name'); ?></title> 
+0

Yap,这样做的伎俩。 :)没有知道'null在网站首页'。干杯! – Gavrisimo 2010-06-28 15:54:49

0

您可以使用wp_title()没有分隔符参数的任何地方像这样:

<?php wp_title(''); ?>