Jump to content
Sign in to follow this  
davemassen

Full width posts

Recommended Posts

davemassen

Hi, I was wondering if there is a way to make full width posts have a different word limit variable to clip posts using the Magazine layout mode. I did a search and found some similar posts but the answers weren??™t what I was looking for: http://www.pagelines.com/forum/discussion/16003/adjusting-excerpt-length-in-feature-full-width-post-vs-clip-magazine-layout/p1 We require a solution that is universal to all posts automatically without having to enter an excerpt manually. http://www.pagelines.com/forum/discussion/comment/82056#Comment_82056 This answer doesn??™t work as it only applies the change to the specified post ID not all future full width posts. We want the full width post to have a longer excerpt than the clip posts. Our site is: http://www.rockindustry.com Thanks

Share this post


Link to post
Share on other sites
Jenny
With [b]PageLines Customize[/b] or [b]Base Theme[/b] activated, you can add this to the functions.php file: [code]function new_excerpt_length($length) { if (is_home() || is_archive() && pagelines_option('blog_layout_mode') == 'magazine') { return 35; } elseif (is_home() || is_archive() && pagelines_option('blog_layout_mode') == 'blog') { return 45; } } add_filter('excerpt_length', 'new_excerpt_length');[/code] Change [b]35[/b] to how many characters you want in a magazine (clip) excerpts and change [b]45[/b] to how many characters you want in full width (post) excerpts.

Jenny :: Web designer at Simple Mama (follow me at @simplemamacom)

Check out Share Me, a social sharing add-on for DMS that is super simple to set up.

Share this post


Link to post
Share on other sites
davemassen
Thanks for the reply! The first variable in that code changes both full width and clips and the second changes nothing. To clarify, we are using the Magazine layout mode. We have 1 full length post at the top of the page then 4 clip posts below ??“ on the same page. We want the full length post excerpt to have a longer word length than the clip excerpts on the same page. Cheers

Share this post


Link to post
Share on other sites
Simon
Dave, use this code http://paste.pagelines.com/2q

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  

×