Support » Themes and Templates » Search results

  • With the following code I can handle search results:

    if ( (have_posts()) and (is_search()) ) {
    // ...
    }

    Now, I want to display the total number of hits (i.e.: 23 articles found…).
    If I use

    while ( have_posts() ) {
    the_post();
    $count++;
    }

    I only get 10 results although there are more. I know, this is due to my admin settings (10 pages as limit).
    How can I get the total of search results?

    Thanks in advance,
    Michael

  • The topic ‘Search results’ is closed to new replies.