Solved

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

Posted on 2016-11-15
8
84 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
 
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
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 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Build an array called $myWeek which will hold the array elements Today, Yesterday and then builds up the rest of the week by the name of the day going back 1 week.   (CODE) (CODE) Then you just need to pass your date to the function. If i…
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
The purpose of this video is to demonstrate how to Import and export files in WordPress. This will be demonstrated using a Windows 8 PC. Go to your WordPress login page. This will look like the following: mywebsite.com/wp-login.php : Click on Too…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

910 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now