Viewing 18 posts - 1 through 18 (of 18 total)
  • Author
    Posts
  • #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!

    #317817

    Hey 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,
    Ismael

    #318016

    Ismael,
    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.
    #318018
    This reply has been marked as private.
    #318075

    Any 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!

    #318757

    Hello,

    Have you tried disabling all third-party plugins to see if it gets fixed?

    Regards,
    Josue

    #318854
    This reply has been marked as private.
    #318863

    I 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.

    #319006

    Hey!

    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!
    Ismael

    #319091

    That 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.

    #320063

    Hey!

    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!
    Peter

    #328813

    Hi, 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

    #329117

    Hey!

    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,
    Josue

    #329316
    This reply has been marked as private.
    #329320
    This reply has been marked as private.
    #329353
    This reply has been marked as private.
    #329526

    Hey!

    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,
    Ismael

    #329578

    Perfect, thank you – and thanks for the quick support
    Have a great day;)

    Regards, Pete

Viewing 18 posts - 1 through 18 (of 18 total)
  • The topic ‘avia_post_nav function not cycling categories even when set to "true"’ is closed to new replies.