Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #177097

    Here is the website in progress: http://rmcantiques.com/z
    A typical page: http://rmcantiques.com/z/?portfolio=french-xix-postmans-desk&preview=true&preview_id=2394&preview_nonce=998c34c4e9

    I would like to restrict the previous and next button links at the sides of the browser to just one category. Currently, they are going through every portfolio item regardless of category. Is this possible?
    Eventually the site will have over 1000 portfolio items. Viewers may get lost.

    #177254

    Hey mikey66!

    Please edit the functions.php file and then add this code:

    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;
    }

    Cheers!
    Ismael

    #177357

    Hello,
    I had the same request. I did make the change but it doesn’t work. With the suggested code the arrow where disabled.

    I did make something wrong?

    Thanks
    Matteo

    #177449

    Hey!

    The arrow would only be disabled if there were no other posts within the same category.

    Best regards,
    Devin

    #177482

    have a look a this page.

    http://www.outletarredamento.eu/portfolio-item/soggiorno-40/

    I have more than one items for categories but I cannot see the arrows.

    thanks
    Matteo

    #177512

    Thanks for the quick response. But that changed the code seems to have disabled the arrows completely. I have multiple posts in the same category, but now no arrows at all.

    #177885

    Ismael & Devin,
    If you check this page:
    http://rmcantiques.com/z/?portfolio=french-xix-postmans-desk
    you will see that changing the code as you suggest seems to disable the arrows entirely. There are multiple portfolio posts in this category, but no arrows show. Is there a minimum number of posts required to trigger the arrows appearing? The code seems like it should work…
    Thanks!

    #177888

    Hi!

    It’s currently not possible to restrict the next/previous buttons to one category if you want to use it with portfolio entries. Basically it’s a wordpress limitation which will probably be fixed in 3.7 or 3.8 but for now it’s not possible. Also see: http://core.trac.wordpress.org/ticket/17807

    Cheers!
    Peter

Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘Previous/Next buttons on Portfolio Items restrict to 1 category?’ is closed to new replies.