Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (have_posts()) :
- $args = array(
- 'showposts' => '5',
- 'paged' => $paged
- );
- $thePosts = query_posts($args);
- ...
- if (have_posts()) :
- $args = array(
- 'showposts' => '5',
- 'paged' => $paged
- );
- $thePosts = query_posts($args);
- global $wp_query;
- echo $wp_query->found_posts;
- ...
- Search Result for
- <?php
- /* Search Count */
- $allsearch = &new WP_Query("s=$s&showposts=-1");
- $key = wp_specialchars($s, 1);
- $count = $allsearch->post_count; _e('');
- _e('<span class="search-terms">');
- echo $key; _e('</span>');
- _e(' — ');
- echo $count . ' ';
- _e('articles');
- wp_reset_query();
- ?>
- $args = array(
- 'cat'=> $cat,
- 'posts_per_page' => 10,
- 'paged' => $paged,
- 's'=> $s
- );
- query_posts($args);
- $startpost=1;
- $startpost=10*($paged - 1)+1;
- $endpost = (10*$paged < $wp_query->found_posts ? 10*$paged : $wp_query->found_posts);
- ?>
- <h2 class="displayResult">Showing results <?php echo $startpost; ?> - <?php echo $endpost; ?> of <?php echo $wp_query->found_posts; ?></h2>
- if (have_posts()) :
- $args = array(
- 'showposts' => '5',
- 'paged' => $paged
- );
- $thePosts = query_posts($args);
- echo $thePosts ->found_posts;
- ...
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement