Forum Replies Created

Viewing 1 replies (of 1 total)
  • Thread Starter localretard

    (@localretard)

    Thanks that actually did help.

    For anyone else with the same or similar issue, I had to customize it around my paging code as so:

    <?php
     $max_first_page = 2;  // Show this many posts on front page
          $args = $wp_query->query;
          $args['caller_get_posts'] = 1; // Using stickies messes up the count
          $args['cat'] = '-179,-4,-70,-19';
          $page = (get_query_var('paged')) ? get_query_var('paged') : 1;
          $posts_per_page = get_query_var('posts_per_page');
          $posts_to_skip = $posts_per_page - $max_first_page;
          if ($page == 1) {
             $max_posts = $max_first_page;
          } else {
             $max_posts = $posts_per_page;
             $args['offset'] = (($page - 1) * $max_posts)- $posts_to_skip;
          }
          query_posts($args);
          if ($wp_query->max_num_pages < ceil(($wp_query->found_posts + $posts_to_skip)/$posts_per_page))
            ++$wp_query->max_num_pages;
          $counter = 0;
          ?>
    
    <? if ( $paged < 2 ) { // Do stuff specific to first page?>
    
    while (have_posts()) : the_post();
             if (++$counter > $max_posts) continue;
    
    <? the_title(); ?>
    		<br/>
    <? endwhile; } else { ?>
    
    <? while (have_posts()) : the_post(); if (++$counter > $max_posts) continue; ?>
    
    <? the_title(); ?>
    			<br/>
    <? endwhile; } ?>
Viewing 1 replies (of 1 total)