我想在WP中使用<!--more-->
,但它不起作用。我正在使用 Wordpress 3.6.1。問題是什麼?無法正常工作<!--more--> in wordpress
文本中後主編:
Abc<!--more-->cba
我如何使用:(?是修訂者插件,你在說什麼)
<?php
$args = array('posts_per_page' => 10, 'order'=> 'ASC', 'orderby' => 'title');
$postslist = get_posts($args);
foreach ($postslist as $post) : setup_postdata($post); ?>
<div>
<?php the_date(); ?>
<br />
<?php the_title(); ?>
<?php the_excerpt(); ?>
<?php the_content(); ?>
</div>
<?php endforeach; ?>
試着在cba之後移動它或在它們之間放一個空格。我不知道這是一個安置問題。 –
你有'global $ post嗎?'在這個代碼之前的某個地方聲明過嗎? setup_postdata()需要$ post,爲了使其他函數正常工作,您需要將它傳遞給全局函數。 –