• Resolved John Doe

    (@kmulders)


    Hi,

    I’d like to display the (1 or 2) most common user search queries of the last 24/48/72 hours on the frontend of my website. Is this possible?

    Thanks in advance!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Mikko Saari

    (@msaari)

    It’s possible, but potentially dangerous. Are you sure you want to allow someone to spam the search results with porn, spam or hate to get their message visible on your site?

    If that’s fine with you, the logs are stored in wp_relevanssi_logs database table, you can fetch the latest search terms from there.

    Thread Starter John Doe

    (@kmulders)

    Comments are disabled on my website and when I only publish the successful search queries, the risk is limited. But good point, thanks! ??

    How can I fetch the latest search terms from the database table?

    Plugin Author Mikko Saari

    (@msaari)

    The searches are logged in the database one row per search. There’s a column for the number of hits found, so you can eliminate the rows where no hits were found. Then it’s up to you how you want to aggregate the results and how you want to display them. If it’s beyond your own skills, this is something any WP developer should be able to help you with.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Successfull user searches on frontpage’ is closed to new replies.