Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #606693

    I have a lot of portfolios all grouped by categories and when you view one there is a right and left tab to page through to the next one. I would like to set the order of the portfolio items so they page through by category and title. So for example all the doors (door category) would page through in order by title and then the next category would start. Is this possible? Thanks.

    #606699

    I found this and tried it but it didn’t seem to do anything.

    function custom_post_grid_query( $query, $params ) {
    $query[‘orderby’] = array( ‘cat’, ‘title’);
    $query[‘order’] = ‘ASC’;
    return $query;
    }
    add_filter( ‘avia_post_grid_query’, ‘custom_post_grid_query’, 10, 2);

    #606703

    Hi!

    Please see – http://kriesi.at/documentation/enfold/how-to-add-an-orderorderby-option-to-the-blogpost-sliderportfoliomasonry-grid-element/ and then add following code to Functions.php file in Appearance > Editor

    add_filter('avia_post_nav_settings', 'avia_post_nav_settings_mod');
    function avia_post_nav_settings_mod($settings)
    {
      if(is_singular('portfolio')) {
        $settings['taxonomy'] = 'portfolio_entries';
      }
    	$settings['same_category'] = true;
    	return $settings;
    }

    Regards,
    Yigit

    #606721

    Here is a portfolio item in the door category ….. http://teddwoodcustomcabinetry.com/beta/cabinetry-option/alameda-door/

    There are 3 items in the category right now Alemeda, Boardwalk and Yellowstone. I have a lot more to add.

    When on http://teddwoodcustomcabinetry.com/beta/cabinetry-option/alameda-door/ the right “next” tab skips Boardwalk and goes to Yellowstone.

    It seems to page through all the portfolio items by the order they were entered.

    I added the code you provided but it didn’t change change the order. Is there somewhere Is there a settings area that I can set the order of all portfolio items?

    thanks, Renita

    #607379

    Hi!

    The avia_post_nav function is based on the get_previous_post and get_next_post functions which can only retrieve post adjacent to current post. I’m sorry but you can’t sort this posts unless you manually adjust the date it was published.

    https://codex.wordpress.org/Function_Reference/get_previous_post

    Regards,
    Ismael

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘order portfolio items’ is closed to new replies.