This topic is: resolved
- This topic has 24 replies, 4 voices, and was last updated 4 years, 6 months ago by .
- The forum ‘General Discussion’ is closed to new topics and replies.
These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.
Community Forums › Forums › Archived Forums › General Discussion › How to Have Academy Pro's beautiful archive grid, for *pages*?
Tagged: academy pro, get_pages, wp_list_pages
Hi , That function won't affect the display of child_pages at all , we aren't displaying 'Posts' and we're not using the post grid option in Academy Pro.
Are you saying that your not seeing all the child pages ?
Yeah, I see only 6, even when there are more.
Ok , understood , sorry i've been a bit busy so slow reply -
Add this line to the beginning of the array in the code I gave you - -1 means all of them , no limit.
'posts_per_page' => '-1',
You should end up with that sectionn of the code looking like below -
if ( is_page( ) ) {
$args = array(
'posts_per_page' => '-1',
'post_parent' => $post->ID,
'post_type' => 'page',
'orderby' => 'menu_order',
);
Alternatively go to > Reading Settings and Change > Blog pages show at most (enter number) , but that will affect all your post archives as well. My choice is go with the 1st option and edit the code adding that line as shown.
Thank you so much! Both work.
I did notice that when I put "-1" in there it shuffles up the posts order differently, why's that? I put '12' in there and the order is good again, only with the 7th post showing 🙂
Look at the orderby arg and change it to what ever you want - reference here - https://developer.wordpress.org/reference/classes/wp_query/
© 2024 WPEngine, Inc.