Jump to content
Sign in to follow this  
jackirenee

Full Content of first post and excerpts for all other posts showing on front page

Recommended Posts

jackirenee

I would like to show Full content of the most recent post on my front page and excerpts of all other posts. How do I do this without also seeing excerpts for the most recent post? http://www.theravensspell.com

Share this post


Link to post
Share on other sites
Simon
Easy, wordpress has these filters built in. [code] add_filter( 'excerpt_length', 'my_custom_length' ); function my_custom_length( $a ) { $new_length = 99999; // set this to the length you want. $postid = 106; // set this to the first post ID global $post; if ( $post->ID == $postid ) return $new_length; else return 55; } [/code]

Share this post


Link to post
Share on other sites
jackirenee
Thanks for the code, but where do I put it and what is meant by first post ID? Also, if I only want thumbnail images to appear on the excerpts, but not the first post, how would this filter be changed?

Share this post


Link to post
Share on other sites
catrina
The filters would be added to the functions.php file. First post ID refers to the ID number given to the first post (106, in this case, is the ID). I think you'll need a new filter for the selective thumbnail placement.

Please read the docs before posting. Please do not private message me unless I ask you to.

Designer | Catrina Dulay

Founder | Catrina and Mouse

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×