• how to change this code to show only 4 posts per page in ‘www’ category?

    <?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; ?>
    <?php query_posts('category_name=www&paged=' . $paged); ?>
    
    <?php if (have_posts()) : ?>
    <?php while (have_posts()) : the_post(); ?>
    
    <div class="bb-100" id="post-<?php the_ID(); ?>">
    
    <h4><?php the_title(); ?></h4>
    <?php the_content('Czytaj dalej &raquo;'); ?>
    
    </div>
    
    <?php endwhile; ?>
    
    <div class="bb-t30 nav-entry-pages">
    <div class="bb-t27 bb-fc bb-marg-nav"><?php if(function_exists('wp_page_numbers')) : wp_page_numbers(); endif; ?></div>
    </div>
    
    <?php else : ?>
    
    <h1>error</h1>
    
    <?php endif; ?>
Viewing 2 replies - 1 through 2 (of 2 total)
  • read the ‘query_posts’ docu:
    http://codex.wordpress.org/Function_Reference/query_posts

    and if you still have questions, report back.

    Thread Starter yozz84

    (@yozz84)

    is this good?
    <?php query_posts('category_name=www&paged=' . $paged, 'posts_per_page=3'); ?>

    because its not working :/

    when i try this:
    <?php query_posts('posts_per_page=3', 'category_name=www&paged=' . $paged); ?>
    it’s also wrong becasue its show me posts which arent in www category…

    sorry but my php is not so good 😉 im new and green ;P

    thx for helping me

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘x posts per page in category… – own template page’ is closed to new replies.