Tagged: woocommerce
-
AuthorPosts
-
September 19, 2016 at 4:47 pm #688608
Hi,
I am building a woocommerce catalog website.I want the next and previous buttons to navigate to products from the same category
Hoiw can I fix it?
Thanks
Uri
September 19, 2016 at 8:56 pm #688778Hi uribinsted!
Please take a look here
https://kriesi.at/support/topic/previousnext-buttons-on-portfolio-items-restrict-to-1-category/let us know if we can do anything else for you.
Best regards,
BasilisJanuary 11, 2017 at 6:02 pm #732181Is this possible to do within the child theme framework? I tried adding…
function avia_post_nav($same_category = true)… to my functions.php file and it caused a fatal error. So I went back to this post and see it says to edit the “functions-enfold.php” which I assume is not the functions.php file in the child theme. Interested to know how I too can restrict Next and Previous to one category.
I’ll also add this to the functionality request, it seems unlikely anyone would want to cruise through multiple Post categories.
Thank you
January 16, 2017 at 4:20 am #733858Hi,
Please add this code in the functions.php file:
add_filter('avia_post_nav_settings', 'avia_post_nav_settings_mod'); function avia_post_nav_settings_mod($settings) { if(is_singular('product')) { $settings['taxonomy'] = 'product_cat'; $settings['is_fullwidth'] = false; } $settings['same_category'] = true; return $settings; }Best regards,
IsmaelJanuary 17, 2017 at 4:46 pm #734802Awesome, this seems to be working! Thx
January 19, 2017 at 8:57 am #735739Hi,
Glad we could help :)
Best regards,
NikkoSeptember 19, 2017 at 4:33 pm #853914Hi,
I copied Ismaels code to my functions.php (child theme) but nothing happens :’ (
Maybe the filter was modified after January? Can you give me an updated code snipped?
I’m using enfold 4.1.2, woocommerce 3.1.2September 20, 2017 at 9:33 am #854259Hi tl_s180,
The filter has not changed. The code should be working. Can you give us temporary admin access to your website in the private content box below, so that we can have a closer look?
Best regards,
VictoriaSeptember 20, 2017 at 7:20 pm #854535Thanks for your response. I figured out it’s working actually.
Most of my products are in multiple categories.
I made some test products with one category only .. and here it’s working as intended.
I guess it’s not possible to navigate to the next product of the current category, if a product is assigned to multiple categories.September 22, 2017 at 9:50 pm #855601Hi,
You are right!
happy you solve it.
Please feel free to let us know if there is anything else we can do for you.Thank you
Best regards,
Basilis -
AuthorPosts
- The topic ‘Enfold – previous and next product-page arrows on posts to navigate to products’ is closed to new replies.
