Community Forums › Forums › Archived Forums › Design Tips and Tricks › Full Blog Post followed by Excerpts
- This topic has 9 replies, 4 voices, and was last updated 8 years, 2 months ago by Brad Dalton.
-
AuthorPosts
-
January 26, 2016 at 8:17 pm #177645sunnypapabearMember
On the Front Page I have a column for recent Blogs and then a Blog Page with the same blogs. Both currently display 5 Blog Excerpts and then a Next Page. On the Front/Home Page I want to show the Full most recent Post followed by four (4) excerpts. I thought maybe there was something that could go in Genesis Custom Code to make it happen. So far I haven't figured it out on my own.
My website is http://PeterCruikshank.com if you want to see what I am trying to do.
Thank in advance for your generous assistance.
http://PeterCruikshank.com/devJanuary 27, 2016 at 1:17 pm #177681Cathy @ WPBaristaMemberThis will work if you put it in the functions file: (i'm not sure about the code plugin)
add_action('template_redirect', 'wpb_custom_post_content'); function wpb_custom_post_content(){ if( is_front_page( ) ){ remove_action( 'genesis_entry_content', 'genesis_do_post_content' ); remove_action( 'genesis_post_content', 'genesis_do_post_content' ); add_action( 'genesis_entry_content', 'wpb_do_post_content' ); add_action( 'genesis_post_content', 'wpb_do_post_content' ); } } function wpb_do_post_content(){ global $wp_query; if( $wp_query->current_post == 0 ){ // full post the_content(); }else{ the_excerpt(); } }
Visit WP Barista to download 52 Quick Edits You Can do Today to Get More Clicks / Views / Sales. I also do paid support (starting at $75) and fully custom Genesis Child Themes.January 27, 2016 at 5:59 pm #177699sunnypapabearMemberThanks Cathy, I tried it. In the Admin panel, under Genesis there is a option for Genesis Code; which allows you to enter Custom CSS and also Custom Functions, so you don't have to actually edit the CSS or Function files. I put the code in the Custom Functions area and saved it. All I got when I tried to go to the URL was a Server Error 500. So I had to remove it. But thanks for trying :0)
January 27, 2016 at 6:18 pm #177702Brad DaltonParticipantYou will need to use FTP to open your functions file and using a code editor, add the code at the end of the file.
January 27, 2016 at 6:30 pm #177703sunnypapabearMemberBut Genesis doesn't want you to directly edit the Functions file and instead provides the Custom Functions so that the Functions file remains clean. I already have one set of functions in the Custom Functions and a ton of css changes in the Custom CSS. All work fine. Anything that works in the Functions file should work the same in the Custom Functions.
January 27, 2016 at 8:48 pm #177707Brad DaltonParticipantJanuary 28, 2016 at 12:11 pm #177748Andrea RennickMemberHe's using the Prose theme. This has a menu item to place custom code.
In this theme the code goes there.
**forum signature**
If you need technical support for your theme please file a ticket.The forums are community based. Staff only monitors the forum for issues relating to the forum itself and to redirect users to where they need to go.
January 28, 2016 at 4:59 pm #177778Brad DaltonParticipantApologies, you are right. I forgot about Prose being a little but different to other themes.
You might try adding the code to a mu-plugin for custom functions.
I tested this and it works however it also works simply by adding the code to Genesis > Custom Code > Custom Functions after the opening <?php tag
January 28, 2016 at 11:24 pm #177794sunnypapabearMemberYes, it works doing it that way. Now I am wondering if having four excerpts after the full post is too much? Any thoughts?
January 29, 2016 at 1:36 am #177800Brad DaltonParticipant -
AuthorPosts
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.