WordPress.org

Forums

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

  1. goodimp
    Member
    Posted 1 year 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 1 year ago #

    Change it to

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

    That should fix it.

  3. goodimp
    Member
    Posted 1 year 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.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Relevanssi - A Better Search
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic