我正在尝试使用一个短代码输出一个自定义post类型的归档文件。除了get\\U next\\U posts\\U链接部分外,一切正常。奇怪的是,它就在一个完美工作的get\\u previous\\u posts\\u链接旁边。
下面是函数
function output_tips() {
global $paged;
$paged = get_query_var(\'paged\') ? get_query_var(\'paged\') : 1;
$args = array( \'post_type\' => \'ht_tips\', \'posts_per_page\' => 1, \'paged\' => $paged, \'caller_get_posts\' => 1, \'orderby\' => \'date\', \'order\' => \'DESC\' );
$loop = new WP_Query( $args );
$inner = \'\';
while ( $loop->have_posts() ): $loop->the_post(); global $post;
$title = \'<h3>\'. get_the_title() .\'</h3>\';
$content = get_the_content();
$output = \'<div class="testimonial">\' . $title . $content . \'</div>\';
$inner .= $output;
endwhile;
$prev = \'<div class="nav-previous">\' . get_previous_posts_link( __( \'<span class="meta-nav">←</span> Previous\' ) ) . \'</div>\';
$next = \'<div class="nav-next">\' . get_next_posts_link( __( \'Next <span class="meta-nav">→</span>\' ) ) . \'</div>\';
wp_reset_postdata();
$open = \'<div class="testimonials">\';
$close = \'</div>\';
$return = $open . $inner . $prev . $next . $close;
return $return;
}
知道为什么会这样吗?