Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #588726

    My client wants to make the following two changes to the portfolio category/archive pages on their site (see example here: ):

    1. Remove pagination of portfolio items by displaying all items. As you can see here: https://northcarolinamusichalloffame.org/portfolio_entries/2010-inductees the portfolio category/archive page is paginated with only 12 portfolio category items being displayed and remainder on page 2.

    2. Default sort the portfolio category items by Title.

    I’ve tried to find the .php file that controls this behavior but can’t find it. Please advise on how best to do this via my child theme.

    #590596

    Hey mikeraymarketer!

    In the Advance layout builder select the masonry gallery and check the edit options

    1.
    Select > portfolio Entries .
    Do not display sort options
    Post Number all

    2.
    Display order will be post name and ascending

    Best regards,
    Vinay Kashyap

    #590629

    @Vinnie, thanks for getting back to me but I know how to make the change you showed.

    My issue is that the portfolio category/archive page is automatically generated and it looks like the page I posted previously: https://northcarolinamusichalloffame.org/portfolio_entries/2010-inductees

    I don’t know how to update the autogenerated category/archive page. I looked at all the .php template page with no success. I’m hoping you can tell me what file is formatting the default category page and hope I can update it to make the changes I suggested above.

    Also, I’d like to add the modified file to my child theme so it doesn’t get erased at the next theme update.

    #592483

    Hey!

    1.) Edit the taxonomy-portfolio_entries.php file then look for the $grid class.

      $grid = new avia_post_grid(array(	'linking' 	=> '',
                                                            'columns' 	=> '3',
                                                            'contents' 	=> 'title',
                                                            'sort' 		=> 'no',
                                                            'paginate' 	=> 'yes',
                                                            'set_breadcrumb' => false,
                                                    ));

    Increase the number of items by adding the “items” attribute plus the value (default: 12) and disable the pagination by setting the “paginate” attribute to “no”.

    2.) Add the ‘query_orderby’ => ‘title’, and ‘query_order’ => ‘DESC’, attributes.

    Cheers!
    Ismael

    #592995

    Ismael,

    Thanks for getting back to me.

    I’ve edited the file per your instructions but the items ( ‘items’ => ’20’, ) attribute is not working. However, pagination set to ‘no’ is working. Checkout one of the category pages here: https://northcarolinamusichalloffame.org/portfolio_entries/2009-inductees/

    Here’s the edited code:

                        $grid = new avia_post_grid(array(	
    					
    'linking' 	=> '',
                                                            'columns' 	=> '4',										
                                                               
    'items' 	=> '20',
    
    'contents' 	=> 'title',
                                                            
    'sort' 		=> 'yes',
                                                            'paginate' 	=> 'no',										
                                                          'set_breadcrumb' => false,
                                                    ));
                        $grid->use_global_query();
                        echo $grid->html();
    
                        ?>

    Also, can you give me an example of where to add the ‘query_orderby’ => ‘title’, and ‘query_order’ => ‘DESC’, attributes.

    #594408
    #598850

    Thanks for the post regarding the order by option. However, you did not respond to the code not working for pagination. Here’s the issue posted again:

    I’ve edited the file per your instructions but the items ( ‘items’ => ’20’, ) attribute is not working. However, pagination set to ‘no’ is working. Checkout one of the category pages here: https://northcarolinamusichalloffame.org/portfolio_entries/2009-inductees/

    #600645

    Hey!

    What happens if you remove the following line?

     $grid->use_global_query();
    

    Replace it with:

    $grid->query_entries();
    

    Cheers!
    Ismael

    #831311

    I was looking to solve the same problem as mikeyraymarketer.
    Tried adding the following to taxonomy-portfolio_entries.php
    'items' => '20',

    which had no effect, but left in place, then tried using
    $grid->query_entries();
    which works, conditionally – as long as it is less than the main WP>Settings>Reading “Blog pages show at most” setting. It will limit the number of posts shown but, it will also show all categories. So not really usable.

    I resolved my issue by going back to $grid->use_global_query(); and using the WP>Settings>Reading “Blog pages show at most” setting. It works for tags as well.

    Hope this helps someone else!

    #831780

    Hi,

    Thank you for sharing, @psstudiosinc!

    We’ll keep this thread open for mikeyraymarketer.

    Best regards,
    Sarah

Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.