Digital experiences for all disciplines
New Landing › How can we help? › Themeforest Theme Support › Neighborhood › Search function
New Landing › How can we help? › Themeforest Theme Support › Neighborhood › Search function
- This topic has 14 replies, 5 voices, and was last updated 10 years by Melanie – SUPPORT.
-
Posted in: Neighborhood
-
January 4, 2014 at 4:54 pm #40311
Hi,
On my website galerietje.emeticus.nl, the search function does not seem to search in products, only news(blog)articles and pages show up. For example, one of the artists in my shop is named Wouter Tulp. This name is also used as a product category and shows up in the description of the product. But, when I perform a search on this name, only the news articles and his page.
I would like to show the products as well. What am I doing wrong?
January 7, 2014 at 8:17 am #40678Hi
Can you post up the URL to a page where this is happening so I can check it out directly?
Thanks!January 7, 2014 at 9:40 pm #40871galerietje.emeticus.nl
January 8, 2014 at 11:09 am #40964I have the same problem. If I use the search box I see products, blog, page post etc. I like to show only products
so go to mydomain.com/?s=XXX&post_type=product instead of mydomain.com/?s=XXX
ThanksJanuary 10, 2014 at 9:13 am #41504Hi Dapper, it definitely also searches products, see here: http://galerietje.emeticus.nl/?s=bremer
supreme it’s not really the same problem, but unfortunately your request is only possible to achieve by modifying the theme’s php code.
Here’s a tutorial http://www.wpbeginner.com/wp-tutorials/how-to-limit-search-results-for-specific-post-types-in-wordpress/All the best
January 10, 2014 at 10:06 am #41525Melanie,
You entered (part of) the name of a product. Yes, then it finds that product.
My question is about the name of the artist being a product category, but when i search for this name, products whit that category are not showing up in the search results.
Could you please look into this matter using the example I gave you?
Regards,
DaphneJanuary 13, 2014 at 1:49 pm #42084You can only search for the item name!
January 13, 2014 at 2:38 pm #42111Aha. Any chance this will change in the future? That the search will index categories too?
January 15, 2014 at 12:51 pm #42636I will forward this to the developer to consider, cheers!
January 16, 2014 at 12:44 pm #42964And there is a simple way instead of use the basic wordpress search, using the woocommerce search?
because if I go to mydomain.com/?s=XXX&post_type=product i see esaclty what I want to see
thanksJanuary 20, 2014 at 5:40 pm #43608Hi,
Yes you can do like that for product search, http://neighborhood.swiftideas.net/?s=case&post_type=product
if you want do that automatically, go to \wp-content\themes\neighborhood\includes\swift-framework\sf-content-display\sf-header.php line #567 looks like this.
$menu_full_output .= '<li><div class="ajax-search-wrap"><div class="ajax-loading"></div><form method="get" class="ajax-search-form" action="'.home_url().'/"><input type="text" placeholder="'.__("Search", "swiftframework").'" name="s" autocomplete="off" /></form><div class="ajax-search-results"></div></div></li>'. "\n";
change that to
$menu_full_output .= '<li><div class="ajax-search-wrap"><div class="ajax-loading"></div><form method="get" class="ajax-search-form" action="'.home_url().'/"><input type="text" placeholder="'.__("Search", "swiftframework").'" name="s" autocomplete="off" /><input type="hidden" name="post_type" value="product" /></form><div class="ajax-search-results"></div></div></li>'. "\n";
That will do the trick for the search form in the header.
Let me know, what you guys got.
Thanks,
laranz.January 21, 2014 at 10:29 am #43793Thanks Laranz, glad to have you back ๐
– Ed
January 21, 2014 at 10:31 am #43794Thanks for welcoming me, Ed ๐
-La ๐
January 21, 2014 at 10:33 am #43796work perfectly! really thanks!
January 24, 2014 at 9:26 am #44467fantasic!!
-
Posted in: Neighborhood
You must be logged in and have valid license to reply to this topic.