Community Forums › Forums › Archived Forums › General Discussion › Page with all Posts but not home page
- This topic has 17 replies, 3 voices, and was last updated 9 years, 5 months ago by Genesis Developer.
-
AuthorPosts
-
November 11, 2014 at 5:23 am #131167MealtogMember
So using a Genesis child theme, everything works. Now is there a way to display a page (ie. blog so to speak) that is like a typical WordPress homepage (posts in reverse chronological order)? Right now, i have archive pages for each category but how do we create a "page" that includes all of the posts?
November 11, 2014 at 6:28 am #131173Brad DaltonParticipantNovember 11, 2014 at 7:53 pm #131228MealtogMemberGood idea, never considered that. Except how do we limit the content like the archive pages? First 250 characters and show featured image etc...
November 11, 2014 at 11:39 pm #131249Genesis DeveloperMemberYou can see this two Tips if you are interested
http://genesisdeveloper.me/full-width-page-content-with-blog-posts/
http://genesisdeveloper.me/page-content-with-gird-blog-posts/You can change the Query Args and filter the post by Category (if you want)
November 12, 2014 at 12:28 am #131250MealtogMemberThanks @genrock. Looks like these templates are almost the same as the default Blog template. Is there a way to limit the content and show a featured image (left justified) like a typical Archive Page for posts?
November 12, 2014 at 12:36 am #131251Genesis DeveloperMemberYou'll setup the settings from Genesis -> Theme Settings -> Archive Content section. Also you'll remove the "post_class" filter from my template. Currently it is supporting 2 columns grid view style for blog posts.
November 12, 2014 at 12:44 am #131252MealtogMemberSilly me. I just saw that. Also remove the 1 line for your post_class and it looks good. Along a similar line, do you know of way to display child pages using this method?
November 12, 2014 at 12:48 am #131253Genesis DeveloperMemberdo you know of way to display child pages using this method?
Ans: did not understand it. Can you explain or share a mockup?
November 12, 2014 at 12:51 am #131254MealtogMemberOn a Parent page, you can use shortcodes to display (in bullets) child pages for that parent page. Is there a way to create a template to display child pages in your 2 column grid. Or even a 1 column default layout, just like Post Archives. Hope that made more sense.
So in short, have your parent page (with content) then display a list of child pages below the content. Just like you what you have done for for Posts except display child pages.
November 12, 2014 at 12:58 am #131259Genesis DeveloperMemberI think that it is a good idea and it is possible. Are you know php little bit? You need to change the Query Args. like
'post_type' => 'page',
'child_of' => 'PARENT PAGE ID here'Please see the WP_Qurey Codex once for more details. I am going offline now. But I'll write a tutorial about it and share it.
November 12, 2014 at 1:01 am #131261Genesis DeveloperMemberSee this http://codex.wordpress.org/Class_Reference/WP_Query#Post_.26_Page_Parameters and use "post_parent" parameter.
November 12, 2014 at 1:20 am #131264MealtogMemberThanks for the info. I don't fully understand the coding. Which line would I replace and what is the syntax for the new line? Sorry, still a little lost.
November 12, 2014 at 1:51 am #131266Genesis DeveloperMemberReplace following bunch of codes
if( $paged < 2 ) $limit = 4; $args = array( 'post_type' => 'post', 'showposts' => $limit, 'paged' => $paged); if( $paged > 2 ) $offset = ( 10 * ( $paged - 1 ) + 4 ); elseif( $paged == 2 ) $offset = 4;
by
$args = array( 'post_type' => 'page', 'post_parent' => get_the_ID(), 'posts_per_page' => -1);
November 12, 2014 at 5:15 am #131271MealtogMemberWow, amazing! There were alignment issues since some titles were 2 lines long so I removed the grid and used a single layout of the child pages. This is briliant. One last question, how do I control how deep to show child pages?
Thanks so much!!!
November 13, 2014 at 12:30 am #131376MealtogMemberHey @genwrock, your code is working so well, I am going to roll it out on a new website. Would you mind sharing the syntax for using the grid on a specific category? Have some photos in Posts that will work very well with your set up! TIA!
November 13, 2014 at 12:54 am #131379MealtogMemberHey @genwrock, one more question. How do I set child pages to deeper levels so a grandchild page will also display?
November 13, 2014 at 6:15 am #131402Genesis DeveloperMemberYou need extra code. You'll run a loop with conditional tag. If have sub sub child then you will print them
November 13, 2014 at 7:12 am #131406Genesis DeveloperMemberThis will help you get_pages()
-
AuthorPosts
- The forum ‘General Discussion’ is closed to new topics and replies.