• Hi,

    i want to show single category on single pages, examples :

    i have 3 category (News, Tutorials et Tips)

    – I have 3 page (News, Tutorials et Tips)
    – I create 3 template (news.php, tutorials.php and tips.php)
    – I place this code on the top of each template :

    <?php query_posts(‘category_name=category’); ?> and change “category” by the category i want to show

    Now, when i show the news page, i see all news and the prev/next buttons but when i go to the next page, nothing change, only url changed to ‘?page_id=71&paged=2’

    I have 3 pages for the news and url are :

    ?page_id=71
    ?page_id=71&paged=2
    ?page_id=71&paged=3

    And i use that between e endwhile and endif :

    <?php posts_nav_link(' - ','Prev','Next'); ?>

    How do i do ?

    Thx

Viewing 1 replies (of 1 total)
  • instead of:
    <?php query_posts('category_name=category'); ?>

    try and use:

    <?php
    $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
    query_posts('paged='.$paged.'&category_name=category');
    ?>

Viewing 1 replies (of 1 total)
  • The topic ‘Show one category per page’ is closed to new replies.