开发者

Wordpress second page displays the same content as my first

I'm seeing my 2nd page displaying the exact same content as my first page.

I followed some articles online and added

<?php $paged = (get_query_var('paged')) ? get_q开发者_如何学Cuery_var('paged') : 1; ?>
<?php query_posts('showposts=16&paged=$paged'); ?>

just one line above my

<?php while (have_posts()) : the_post(); ?>

But it's still the same... please help mee!!

edit: a link might have been helpful => http://nailian.ca/


here's your problem:

<?php query_posts('showposts=16&paged=$paged'); ?>

it should be:

<?php query_posts("showposts=16&paged=$paged"); ?>

Notice the different quote sign? on single quote, dollar sign is treated as is, not parsed as variable as stated in PHP doc:

Note: Unlike the double-quoted and heredoc syntaxes, variables and escape sequences for special characters will not be expanded when they occur in single quoted strings.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜