-
AuthorPosts
-
February 11, 2017 at 12:24 am #745661
I need to have a product search field for woocommerce at the beginning of the store category pages.
How can I do it? How can I work on a category page of the woocommerce store?
I am using this code because I need a product shop search icon at the beginning of the store, in the mobile version.
add_theme_support( 'avia_custom_shop_page' );Thanks
February 13, 2017 at 8:01 pm #746595Hi,
please I need to have a product search field on top of categories shop pages.
Thanks
February 14, 2017 at 9:13 pm #747108Hi,
Can you try to post a link to your page? also if you can give us a draft on where you want to place it.
Best regards,
NikkoFebruary 15, 2017 at 5:01 pm #747537Hello
I have the sketch of the web hosted in a temporary host with an alternative url.
The current website is http://www.gardenbourguignon.com/ I made a few years ago.
But now we are going to transform it into an online store, and I downloaded enfold shop demo to test it.
At the moment I am happy and when it is finished, I will replace the old one by the online store. It will be the same domain, not two web pages. It’s just a redesign.
To put at the beginning of the store a product search field for woocommerce, I used this code:Add_theme_support (‘avia_custom_shop_page’);
To be able to use the visual editor.
But I need this field of product search for woocommerce also on the category pages.
In the private field I send a link to the store page and another to a category page.Thank you
February 21, 2017 at 8:19 am #749795Hi!
Thank you for the info.
You can use the following hook in combination with the is_tax(‘product_cat’) conditional function.
// http://hookr.io/actions/woocommerce_before_shop_loop
// https://codex.wordpress.org/Function_Reference/is_taxBest regards,
IsmaelFebruary 21, 2017 at 11:46 pm #750199Could this code be?
if(is_tax('get_search_form')) { do_action( 'woocommerce_before_shop_loop', $wc_print_notices, $int );}If it is correct … where should I put it?
February 22, 2017 at 7:36 am #750292Hi!
I’m afraid that’s not correct. The code should look something like this:
add_action('woocommerce_before_shop_loop', function() { if(is_tax('product_cat')) { get_search_form(); } });Add it in the functions.php file.
Best regards,
IsmaelFebruary 25, 2017 at 8:14 pm #751821Hello,
thank you very much.
It works very well
:)
February 27, 2017 at 5:30 am #752139 -
AuthorPosts
- The topic ‘Product search field for woocommerce at the beginning of store category pages.’ is closed to new replies.
