WordPress.org

Ready to get started?Download WordPress

Forums

Relevanssi - A Better Search
[resolved] Display number of search results using the Headway Theme (3 posts)

  1. goodimp
    Member
    Posted 5 months ago #

    I'm using the Headway theme and trying to display the number of search results on the search page. I inserted the code below (which you listed on your FAQ section to perform this task) into a custom code block but it's not displaying the number.

    <?php echo 'Relevanssi found ' . $wp_query->found_posts . ' hits'; ?>

    I appreciate you may not be familiar with Headway so any help would be great.

    https://wordpress.org/plugins/relevanssi/

  2. Mikko Saari
    Member
    Plugin Author

    Posted 5 months ago #

    Change it to

    <?php global $wp_query; echo 'Relevanssi found ' . $wp_query->found_posts . ' hits'; ?>

    That should fix it.

  3. goodimp
    Member
    Posted 5 months ago #

    Brilliant, that's done the trick.

    Thanks for responding so quickly. I shall send a donation and spread the word amongst the Headway community about Relevanssi.

Reply

You must log in to post.

About this Plugin

About this Topic