Community Forums › Forums › Archived Forums › Design Tips and Tricks › Galleries Page using Genesis Portfolio Pro Plugin
Tagged: Genesis Portfolio Pro
- This topic has 11 replies, 3 voices, and was last updated 7 years ago by
Brad Dalton.
-
AuthorPosts
-
April 6, 2017 at 9:54 am #204393
Michael
MemberGreetings-
I am working on a site at http://www.emileewolseyphotos.com/ and would like the Galleries page to include all of the portfolio items instead of only 6. Is this possible?
I'm using Gallery Pro child theme with the Genesis Portfolio Pro plugin.
I have not been able to locate where I would need to change this setting.
Thanks in advance.
MichaelApril 6, 2017 at 5:54 pm #204412Brad Dalton
ParticipantTry this
add_action( 'pre_get_posts', 'limit_portfolio_items' ); function limit_portfolio_items( $query ) { if ( $query->is_main_query() && ! is_admin() && is_post_type_archive( 'portfolio' ) ) { $query->set( 'posts_per_page', '3' ); } }
And change the number 3 in the code.
April 7, 2017 at 9:13 am #204436Michael
MemberHi Brad!
Thanks man for the help! I tried this code, changing the number to 100, and installed it in the functions.php file of the plugin and the main site (not in both places at the same time), but no changes. Perhaps I am not putting the code in the right place? Or do I have to declare those actions elsewhere?
Greatly appreciated!
MichaelApril 7, 2017 at 5:41 pm #204467Brad Dalton
ParticipantNever add code to a plugin. Add the code to your child themes functions file.
April 7, 2017 at 5:55 pm #204470Michael
MemberYea, that's what I thought but when I added the code to the functions.php file, changed the number to 100, it didn't help, so I tried the plugin just in case that was what you meant.
Anyhow, I just added the code to functions.php of the child theme and no effect. Suggestions?
Thanks again!April 7, 2017 at 6:04 pm #204471Brad Dalton
ParticipantWorks fine for me.
Are you wanting to limit portfolio items in the portfolio archive?
April 7, 2017 at 8:17 pm #204478Michael
MemberNo, I want to make the Galleries page display all of the Portfolio Items, so it seems it would be an increase because now it limits to the last 6 Portfolio Items. Emilee wants a Portfolio Item for each photo shoot and for each of these Portfolio Items to display at the Galleries page. Currently there are 9 or 10, which do show up in the Portfolio Archive, but it only shows the last 6 on the Gallery page. I would like them all to show up at the Gallery page where the styling is more to our liking.
April 7, 2017 at 8:19 pm #204479Brad Dalton
ParticipantApril 7, 2017 at 8:27 pm #204480Michael
Memberthanks Brad, here it is.
April 7, 2017 at 8:33 pm #204482Michael
MemberBrad, I got it figured out. You got me thinking anyway and I did find that page is controlled by a widget and then the genesis featured custom post....first time dealing with that. Anyhow, I did find the setting in that widget and fixed it. Thanks for your help! You're a blessing to this forum!
April 26, 2018 at 3:31 am #219289josephbrunidge
MemberHi Michael,
I am having the same issue where not all portfolio items are appearing in the archive. I tried setting the max number to 100 just like you, but only 13 appear. Do you remember how you fixed it?
Thank you,
Joe
April 26, 2018 at 3:52 am #219290Brad Dalton
ParticipantThis code overrides the items per page settings added by the plugin
-
AuthorPosts
- The topic ‘Galleries Page using Genesis Portfolio Pro Plugin’ is closed to new replies.