如何删除这些WordPress函数产生的换行符?

时间:2011-07-07 20:53:40

标签: php wordpress function line-breaks

我尝试了以下操作但它不起作用:

<div class="entry">
<?php
echo the_date() . " " . the_category();
if ( $woo_options['woo_post_content'] == 'content' || is_single() ) { the_content(__('Continue Reading &rarr;', 'woothemes') ); } else { the_excerpt(); }
if ( $woo_options['woo_post_content'] == 'content' || is_singular() ) wp_link_pages( $page_link_args );
    ?>

现在输出看起来像这样:

July 7, 2011
Sports

我想删除两者之间的换行符,使它看起来更像这样(全部在一行):

July 7, 2011 Sports

2 个答案:

答案 0 :(得分:0)

这些函数不应该在其中内置换行符。你看到的机会是由于打开和关闭你的PHP,或者是其他地方的流浪<br/>。向我们展示整个代码,以便我们提供帮助。否则,试试这个:

echo the_date() . " " . the_category();

答案 1 :(得分:0)

嘿不要将echothe_date()the_category()函数一起使用,因为它们本身会返回回显数据。

相关问题