WordPress.org

Ready to get started?Download WordPress

Forums

Search results (1 post)

  1. Michael_
    Member
    Posted 8 years ago #

    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

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.