Search blog dropdown
This topic contains 5 replies, has 3 voices, and was last updated by BL Interactive 10 years, 9 months ago.
We have moved to a support ticketing system and our forums are now closed.
Open Support TicketTagged: search
-
AuthorPosts
-
February 19, 2015 at 1:12 pm #31381
I have the search field at the top of every page, now the dropdowns are places and events. Is it possible to add a 3rd option that is everything and that pushed the search request to the default search so my visitors can search articles from the same form?
places > places search results
events > events search results
everything > standard search resultsI am using advanced search if that helps/hurts things.
February 19, 2015 at 1:52 pm #31391That would be very tricky if possible at all.
Why not add GD Search widget and normal WP Search widget and title them:
“Search listings” or “Search whole site”.February 19, 2015 at 2:24 pm #31404Having multiple search boxes is bad UX.
it just need to pass the field to URL?s=searchterm
I love when someone says just need to when they have no idea.
February 19, 2015 at 11:56 pm #31489Misread your question, I thought you want to search everything at the same time, which you can do with WP search, but it will not return the results of GD listings in the GD search page.
I guess it might be possible to add an extra option by copying the widget and adding your own code.
I’ll alert the others to your question too.February 20, 2015 at 7:02 pm #31555Hi,
I’ve looked into your request and stopped after 5 minutes because it would require to rewrite part of the GD search widget and also modify part of the advance search widget addon. Not even sure it can all be done only via hooks. Only Stiofan could tell us more about it…
I think there is a much simpler option that you should consider and that integrates Guust’s suggestion.
Instead of using 2 forms on the page that I agree would be bad UX, you could show only the form needed and add the selection Listings/Everywhere elsewhere.
Example: http://wpgeo.directory/
added a text widget above the gd search widget.
added 2 links “Listings” “Everywhere”.
added the regular search below the gd search widget and hidden with css.
added few lines of JS to show/hide one or the other
added little css for regular form to start look like listings form and give you the idea.html for links in text widget:
<div class="alternative-search"><a id="gd-listings" href="#">Listings</a> <a id="everything" href="#">Everything</a></div>css:
.widget_search .screen-reader-text { display: none; } #s { float: left; margin: 0 10px 0 0; background-color: #fff; } .widget .searchform { margin: 10px auto; width: 33%; } .widget_search { display: none; }jQuery:
<script type="text/javascript"> jQuery(document).ready(function(){ jQuery("#gd-listings").click(function(){ jQuery(".widget_search").hide(); jQuery(".geodir_advance_search_widget").show(); return false; }); jQuery("#everything").click(function(){ jQuery(".widget_search").show(); jQuery(".geodir_advance_search_widget").hide(); return false; }); }); </script>If you like the idea, this can be accomplished with another 15 minutes of css and it took me 10 minutes from start to end.
Achieving the same modifying the code would take so much longer that I wouldn’t even consider it.
Let us know,
Thx
February 20, 2015 at 9:04 pm #31560Thanks for looking into this.
Funny I was dabbling with something similar. Trick is, I am using the search shortcode to integrate with some of my non GD pages.
-
AuthorPosts
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket