Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Behavior for product and categories
- This topic has 4 replies, 2 voices, and was last updated 9 years, 7 months ago by
nemanja.
-
AuthorPosts
-
October 17, 2016 at 3:05 pm #10494
nemanja
ParticipantI would like to add categories in search results beside products
?s={phrase}&post_type=product
What should I add?Regards
October 17, 2016 at 3:09 pm #10495Ernest Marcinko
KeymasterHi!
As far as I know, it’s not possible to display them on the WooCommerce search results page (redirection to “?s={phrase}&post_type=product”).
Unfortunately that page is managed by WooCommerce/Theme and I have not yet seen any WooCommerce theme capable of displaying other than products there.
October 18, 2016 at 11:31 am #10505nemanja
ParticipantHi,
Thanks for your quick answer.
I just want to list all products inside some category or subcategory, not to show category by name.
It is possible to list products through autocomplete, but not on return key behaviour.What is this for? https://wp-dreams.com/knowledge-base/how-to-add-variables-to-the-redirect-to-url-or-the-show-more-url/
Don’t get what are “param1” => “value1” for. Could I set anything there?
Regards
October 19, 2016 at 10:52 am #10520Ernest Marcinko
KeymasterHi!
“I just want to list all products inside some category or subcategory, not to show category by name.”
If you want only product results, but not the product categories as results, then make sure everything is disabled on the General Options -> Sources 2 panel: https://i.imgur.com/Cy5Mkd5.pngTo include items from a specific sub-category, you can use the include option on the Advnaced Options -> Exclude reuslts panel: https://i.imgur.com/9tM0Wf8.png
“It is possible to list products through autocomplete, but not on return key behaviour.”
If you mean like not triggering the ajax search on hitting the return key, you can configure that on the General Options -> Behavior panel: https://i.imgur.com/nJ6qmOt.pngDon’t get what are “param1” => “value1” for. Could I set anything there?
This is when you have redirection activated when hitting the return button or the magnifier icon. This code allows you to pass additional query (GET) parameters if you need it. It’s mostly for developers use. In the example the $value array is set as following:[php]$values = array(
"param1" => "value1",
"param2" => "value2",
"param3" => "value3"
);[/php]This will result in a redirection from this:
[code]yoursite.com/s?=test[/code]
to:
[code]yoursite.com/s?=test¶m1=value1¶m2=value2¶m3=value3[/code]
I do not recommend using that, unless you have a reason to do so.
October 19, 2016 at 12:44 pm #10521 -
AuthorPosts
- You must be logged in to reply to this topic.