Wordpress分页停留在同一页面上

时间:2014-08-15 17:53:28

标签: php jquery html css wordpress

您好,我目前正在一个网站上工作,我已经创建了一个模板,我将要销售的项目,我想要显示10个项目,然后转到下一页。然而,分页不起作用。当我点击较旧的条目时,在网址中显示分页2,但内容是相同的!我怎样才能解决这个问题?下面是我的代码。

<div id="shop_header"><h1>OUR SHOP</h1></div>

<div id="items_details" class="wrap clearfix">



<?php

$ paged =(get_query_var('paged'))? get_query_var('paged'):1; query_posts('cat = 2&amp; posts_per_page ='。get_option('posts_per_page')。'&amp; paged ='。$ paged); ?&GT;

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

    <div <?php post_class() ?> id="post-<?php the_ID(); ?>" >

    <article>

    <div class="item">

            <div id="item_header" class="clearfix">
                <h2 class="item_head"><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></h2>

            </div>  

            <div class="img">
            <?php the_post_thumbnail(); ?>
            </div>



            <p><?php the_content(); ?></p>

            <div id="social_posts" class="clearfix">

            <ul>

            <li id="like"></li>
            <li id="comment"><?php comments_popup_link('0', ' 1 ', '%'); ?></li>

            </ul>

            </div>


            <button class="clearfix"><a href="<?php the_permalink(); ?>">Buy Now</a></button>

    </div>      
    </article>

                

    

    <h2>Not Found</h2>

<?php endif; ?>

0 个答案:

没有答案
相关问题