-
AuthorPosts
-
September 11, 2014 at 7:46 pm #317611
I know this is a topic that has been covered a number of times on this site. However I have made the change to TRUE within the function parameters as follows:
function avia_post_nav($same_category = true, $taxonomy = ‘category’)
But for some reason there is no Next and Prev options showing. I am using the latest version of the theme and latest 4.0 release of wordpress.
I also double checked that the products are flagged within a category.
If you could please provide some support on this it would be much appreciated!
Thanks!
September 12, 2014 at 4:39 am #317817Hey rossboom22!
Thank you for using Enfold.
Did you add any full width slider on the page? Add this on functions.php:
add_filter('avia_post_nav_settings','avia_remove_fullwidth_slider_check', 10, 1); function avia_remove_fullwidth_slider_check($settings) { $settings['is_fullwidth'] = false; return $settings; }
Please undo the changes on functions-enfold.php then add this code to filter the post navigation on the same category:
add_filter('avia_post_nav_settings','avia_same_category_filter', 10, 1); function avia_same_category_filter($settings) { $settings['same_category'] = true; return $settings; }
Regards,
IsmaelSeptember 12, 2014 at 11:44 am #318016Ismael,
I have tried your solution, however the Next & Previous buttons still are not visible.- This reply was modified 10 years, 2 months ago by rossboom22.
September 12, 2014 at 11:47 am #318018This reply has been marked as private.September 12, 2014 at 1:42 pm #318075Any chance someone could look at this as a matter of urgency! Been 2 days now, site is scheduled to go live and this is the only thing holding us up.
Cheers!
September 14, 2014 at 5:18 am #318757Hello,
Have you tried disabling all third-party plugins to see if it gets fixed?
Regards,
JosueSeptember 14, 2014 at 1:28 pm #318854This reply has been marked as private.September 14, 2014 at 1:50 pm #318863I have just put a fresh copy of Enfold Theme, With a WordPress 4 and latest WooCommerce. Added the code suggested and still Prev & Next buttons do not show. So i have ruled out any issue with any work we have done. It seems to be an issue with original files.
September 15, 2014 at 5:22 am #319006Hey!
Thank you for the info and sorry for the delay.
Looks like the snippet that we provided will not work for single products. Please remove the snippet:
add_filter('avia_post_nav_settings','avia_same_category_filter', 10, 1); function avia_same_category_filter($settings) { $settings['same_category'] = true; return $settings; }
Test the product navigation again. I’ll ask Dude to take a look.
Cheers!
IsmaelSeptember 15, 2014 at 10:23 am #319091That code was removed already and it still does not work. Please not i have also tried this with only running a clean install of WordPress 4, Latest WooCommerce and latest Enfold theme.
September 16, 2014 at 6:52 pm #320063Hey!
If you want to restrict the categories for products too you need to use a slightly modified version of the code:
function category_specific_post_nav($settings) { $settings['same_category'] = true; if(is_product()) { $settings['taxonomy'] = "product_cat"; } return $settings; } add_filter('avia_post_nav_settings','category_specific_post_nav', 10);
Cheers!
PeterOctober 2, 2014 at 10:31 am #328813Hi, It seems that the filter does not work on portfolio-item if you only want to view the same category
add_filter('avia_post_nav_settings','avia_same_category_filter', 10, 1); function avia_same_category_filter($settings) { $settings['same_category'] = true; return $settings; }
It has previously done, you have a solution to it?
Regards, Pete
October 2, 2014 at 5:38 pm #329117Hey!
It should work, make sure your portfolio items don’t share the same parent category. Can you post a link to your install?
Best regards,
JosueOctober 2, 2014 at 10:56 pm #329316This reply has been marked as private.October 2, 2014 at 11:07 pm #329320This reply has been marked as private.October 2, 2014 at 11:52 pm #329353This reply has been marked as private.October 3, 2014 at 8:15 am #329526Hey!
You can use this on functions.php:
add_filter('avia_post_grid_query', 'avf_custom_post_grid_query'); function avf_custom_post_grid_query ( $query ) { $query['orderby'] = 'name'; $query['order'] = 'ASC'; return $query; }
Refer to this link for more order/orderby parameters: http://codex.wordpress.org/Class_Reference/WP_Query#Order_.26_Orderby_Parameters
Regards,
IsmaelOctober 3, 2014 at 10:00 am #329578Perfect, thank you – and thanks for the quick support
Have a great day;)Regards, Pete
-
AuthorPosts
- The topic ‘avia_post_nav function not cycling categories even when set to "true"’ is closed to new replies.