Community Forums › Forums › Archived Forums › Design Tips and Tricks › Search Box to Agent Press Search Widget
Tagged: Agentpress, Search widget
- This topic has 11 replies, 3 voices, and was last updated 9 years, 5 months ago by Ginger.
-
AuthorPosts
-
July 11, 2015 at 8:06 am #159091brent sMember
In the Agent Press theme, I would like to add a search box to the search widget to work in conjunction with the pulldown menus. Specifically, I want the user to be able to type in a zip code and then use the pull down menu to further "filter" from among the options I am not a coder, but hoping someone can direct me, or at least point me in the direction, of how to do this.
July 11, 2015 at 11:26 am #159100GingerParticipantHi Brent,
I don't think this is do-able with the standard AgentPress Listings plugin....that is to filter an existing search. You can, however, add links to the menus for specific searches. To do this, on the search bar set your search criteria and click the search button, then copy/paste that URL it creates and add as a custom link to your menu.
Hope this helps!
@gscoolidge | Support Nerd | Website Producer/Tweaker | IDX Integrations | Hosting Options
July 11, 2015 at 1:45 pm #159112TomParticipantHi Brent and Ginger,
I wondered about this and was intrigued. It turns out you can do this entirely from the dashboard.
(with the listings widget, not straight search)How to Add Zip Code Filtering to AgentPress
Choose your next site design from over 350 Genesis themes.
[ Follow me: Twitter ] [ Follow Themes: Twitter ] [ My Favourite Webhost ]July 11, 2015 at 1:52 pm #159114GingerParticipantHi Tom,
Thanks for chiming in! Yes, you can certainly add zip code as one of your taxonomies.....I probably misunderstood the original question and was trying to make it more complicated (filtering the first search with a second)
@gscoolidge | Support Nerd | Website Producer/Tweaker | IDX Integrations | Hosting Options
July 11, 2015 at 2:22 pm #159116TomParticipantI don't think you misunderstood - I thought exactly the same thing 🙂 - faceted search. But you can achieve a similar result with the plugin alone.
Choose your next site design from over 350 Genesis themes.
[ Follow me: Twitter ] [ Follow Themes: Twitter ] [ My Favourite Webhost ]July 11, 2015 at 2:24 pm #159117brent sMemberTom & Ginger,
Thank you. However, Tom's solution only gives me a zip code drop down menu. I am dealing with 400+ zip codes, so I don't think a drop down is most efficient. I think I need a search box where the person could type in their own. Here is a link to a site that I found in the forum, which appears to have this functionality or something similar to it with a "text search" box.
July 11, 2015 at 2:28 pm #159118brent sMemberTom & Ginger,
As I am reading your responses, are the current pulldown menu's not working in conjunction with one another? I mean, if I use the pull down menu and choose 3 Bdrm and use the next pull down for price and select a range, doesn't the search pulling only those CPTs that fit both of those criteria?
I am happy to put a zip code on each listing, I would just like to have a text input box for people to find their zip code as opposed to having a pulldown menu with hundreds of pull down options that a customer would have to go through.
July 11, 2015 at 4:14 pm #159122GingerParticipantAh ha, a link! Now I understand.....that site is using an IDX service as well as the AgentPress Listings plugin, which on AgentPress Pro is a good idea to take advantage of the beautiful styling that comes included.
So the search bar is from an IDX where you can enter a value like you said. The Featured Properties area is using the AgentPress Listings - Featured Listings widget. To achieve what you would like you might consider an IDX service. That site is using Diverse Solutions which I do not recommend, they change their back end a lot as of late that can break your site. IDX Broker is probably the biggest but they do not offer a zip code search (which is just CRAZY), I recommend iHomeFinder. Just my two cents worth.
@gscoolidge | Support Nerd | Website Producer/Tweaker | IDX Integrations | Hosting Options
July 11, 2015 at 4:19 pm #159123brent sMemberThank you Ginger,
However, I am not wanting to use an IDX service. I just want to pull in from my CPTs and have the search box.
July 11, 2015 at 4:42 pm #159125GingerParticipantThe AgentPress Listings search bar doesn't offer that. A couple of other options: you can use a regular search widget (it's a default WordPress widget for text searches) on your site for them to enter their zip code to narrow down the list. A couple of caveats:
* Custom post types are not searched by default but that's easily changed. Follow the instructions in the tutorial on the link below and add 'listings' to the search criteria - be careful when editing your functions.php file, it is not recommended to do this in your WordPress admin but edit via FTP or file access to your host:
https://thomasgriffin.io/how-to-include-custom-post-types-in-wordpress-search-results/
* If you go this route, when entering your listings put the zip code in the page description content....it doesn't seem to recognize them from the taxonomy short codes.
* Another option is to try other free listing plugins that allow you search by zip code via typing it in. Here is one I've recently heard about but I'm not sure what all it offers:
@gscoolidge | Support Nerd | Website Producer/Tweaker | IDX Integrations | Hosting Options
July 11, 2015 at 5:29 pm #159129TomParticipantWe seem to be covering the same ground, but getting different results.
The Clearwater site uses n IDX plugin for MLS properties and the AgentPress Listings plugin for featured properties. But the IDX home page widget does not return results on zip code. The header search box does return CPT listings and pages for zip code searches.
In my local testing, searches for sample zip codes returns results only if the zip code is in the listing title, as they are maintained on the Clearwater site. the code from Thomas Griffin did nothing, as did a snippets from Paul Lund:
http://www.paulund.co.uk/include-all-custom-post-types-in-wordpress-search
The Clearwater site is using Jetpack, but Omnisearch local testing also fails on listing CPT zip code search. See also:
http://www.colegeissinger.com/blog/2013/07/02/adding-custom-post-types-to-omnisearch-in-jetpack/ http://www.amandagiles.com/blog/add-custom-post-types-omnisearch/
[ I feel like I'm missing something obvious ... ]
@brent-s One solution for now may be to include the zip code in the listing post title, which should also make it more attractive for search from Google and others. Your users will be able to get search results from your listings using zip code in the WordPress search box.
Choose your next site design from over 350 Genesis themes.
[ Follow me: Twitter ] [ Follow Themes: Twitter ] [ My Favourite Webhost ]July 11, 2015 at 6:06 pm #159133GingerParticipantTom:
* The Location search box on the homepage search bar is for cities only so zips won't work there. This search is only for the IDX listings, it will not include any of the AgentPress Listing entries.
* The code snippet is needed to use the search at the top of the site (standard WP search) since custom post types are not included in the standard WP search by default. As mentioned if you enter the zip code in the listing description, it will be found there. Title is found too but it may not be as visually appealing in my opinion. But you're right, both will work. These items found will be a separate list from the IDX entries on the referenced site.
@gscoolidge | Support Nerd | Website Producer/Tweaker | IDX Integrations | Hosting Options
-
AuthorPosts
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.