Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Can you find out what people are searching for in search forms built into wordpress themes?

Posted on 2016-11-15
8
120 Views
Last Modified: 2016-11-23
Hi there ,
Does anyone know if you can look into whether we can do the following on the stock control page in wordpress searches of stock:
They are using a vehicle search here http://ballinacampers.com.au/stock-listing/ using a specific theme shandora for car listings.  What I wanted to know was

a) what the search history on the search panel has been and whether its possible to do so - ie find what people are searching for?
Its not a form plugin but one a part of the theme shandora internal search.....

b) add something that says something along the lines of "Can't find what you're looking for? Send us your details and we'll let you know when we have something suitable" - which then has a data capture form that emails through to BCMC
0
Comment
Question by:Amanda Watson
  • 4
  • 4
8 Comments
 
LVL 25

Expert Comment

by:James Rodgers
ID: 41889635
it's tedious, but as you wan to do it stock, and this requires no code changes IF you have google analytics installed, just checked and you do

a) your google analytics will track results for you
look for http://ballinacampers.com.au/?s=motorhome and simillar, export your analytics history to a db and search for ?s= and parse out the search terms

that will get you historical search data, going forward look for a plugin or add code to update a search table
plugin option: https://wordpress.org/plugins/search-meter/

b) you are using a child theme, i couldn't find your theme online for download so that I could find the actual file, so...
  • search for the current file containing the phrase "Apologies, but no entries were found."
  • if the file is not already in your child theme directory then copy it to the child theme directory
  • update the file in the child theme directory by replacing the above phrase with your new phrase add styling classes as required
    • important
    • do not update the file in the main theme directory, as when/if you update the main theme your changes will be lost
1
 
LVL 11

Author Comment

by:Amanda Watson
ID: 41890679
Ok, fantastic information.  So when/if I can find the file that says, your search doesn't find anything blah blah, would adding a form into this page be an easy thing to do so people could send an enquiry?  Even better, somehow populate the form with the search points?
0
 
LVL 25

Accepted Solution

by:
James Rodgers earned 500 total points
ID: 41891393
you can replace the content with anything, a simple phrase, a form, an image etc., but if you do not have a developer available to help i would suggest to go with a simple phrase change for now and find a local developer who can replace the phrase with a "contact us " type form for when no results are found. something like:

Sorry we could not find what you were looking for, but that doesn't mean we can't help you, just fill in the form below and we will get back to you as soon as possible.

Name - text input
Email - text input
List of search terms - visible list but hidden form field with search terms
Comments - textarea
Spam prevention - captcha (might not be necessary as a this is form only shows on a failed search, so it is not really public per se, but you can usually add one easily enough if you see a lot of spam)
Submit button

do the form as ajax submission

couple of things about forms, if you use a plugin to do the  form, Gravity Forms is a good one but you need to pay for the best features, make sure it has logging also, compare logs to emails received, 99% of the time they are the same, but logging will capture an email that was lost or failed to send, which can happen, rare, but possible, so log every form submission just in case
0
Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

 
LVL 11

Author Closing Comment

by:Amanda Watson
ID: 41892352
Thanks so much for such detailed help.
I might be back for help on the page in question AAA
0
 
LVL 25

Expert Comment

by:James Rodgers
ID: 41892772
glad i could help
0
 
LVL 11

Author Comment

by:Amanda Watson
ID: 41896794
Sorry to bother you again on this question, but what exactly did you mean by saying that the form would have;
"List of search terms - visible list but hidden form field with search terms"

What is the visible list but hidden form fields?.

Did you simply mean a visible list of the searched fields and all the array of available search options are hidden?
0
 
LVL 25

Expert Comment

by:James Rodgers
ID: 41897442
suppose the person searches for "2 bedroom motor home"


in the form you would have a div/p/span showing the user their search terms

<div>You searched for: <b>2 bedroom motor home</b><div>

Open in new window

and in the form have a hidden field
<input type="hidden" name="search_terms" value="2 bedroom motor home">

Open in new window

on the back end you can do a number of things with the search terms
keep it complete and save to the data base as "2 bedroom motor home" and/or parse it out to individual terms
if you parse it out identify it as parsed vs full search terms

the db would then look something like this

record_id search_term parsed
1 "2 bedroom motor home" 0
2 2 1
3 bedroom 1
4 motor 1
5 home 1
6 motorhome 0
7 brandname motorhome 0
8 brandanme 1
9 motorhome 1


you can then use this information to do some analysis for tome search terms and adjust your content accordingly also you can determine them were x number of seaches for brandname y and n number of searches for brandname k

the more data and the more granular the data the better analysis that can be provided
0
 
LVL 11

Author Comment

by:Amanda Watson
ID: 41899874
Ok, I think I understand what all this means.  Ill be in touch if I can't figure it out
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
AJAX pass along a variable 3 46
How do I show metrics with PHP or Javascript 6 31
issue with DB import 1 17
Remove a page from Google? 2 16
Many developers have database experience, but are new to PostgreSQL. It has some truly inspiring capabilities. I have several years' experience with Microsoft's SQL Server. When I began working with MySQL, I wanted a quick-reference to MySQL (htt…
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
The purpose of this video is to demonstrate how to set up an RSS Feed on a WordPress Website. This will be demonstrated using a Windows 8 PC. Feedburner will be used for this demonstration. Go to your WordPress login page. This will look like the…
The viewer will learn how to count occurrences of each item in an array.

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question