Tagged: pagination, portfolio category page
-
AuthorPosts
-
February 25, 2016 at 4:25 am #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.
February 29, 2016 at 8:28 am #590596Hey 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 all2.
Display order will be post name and ascendingBest regards,
Vinay KashyapFebruary 29, 2016 at 10:12 am #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.
March 3, 2016 at 8:55 am #592483Hey!
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!
IsmaelMarch 3, 2016 at 11:06 pm #592995Ismael,
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.
March 7, 2016 at 4:26 pm #594408Hi!
Please refer to this post – http://kriesi.at/documentation/enfold/how-to-add-an-orderorderby-option-to-the-blogpost-sliderportfoliomasonry-grid-element/
Best regards,
YigitMarch 16, 2016 at 9:47 am #598850Thanks 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/
March 19, 2016 at 9:48 am #600645Hey!
What happens if you remove the following line?
$grid->use_global_query();
Replace it with:
$grid->query_entries();
Cheers!
IsmaelJuly 28, 2017 at 9:52 pm #831311I 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!
July 30, 2017 at 10:32 am #831780Hi,
Thank you for sharing, @psstudiosinc!
We’ll keep this thread open for mikeyraymarketer.
Best regards,
Sarah -
AuthorPosts
- You must be logged in to reply to this topic.