Digital experiences for all disciplines
New Landing › How can we help? › Themeforest Theme Support › Flexform › Excerpt length for Home page blog items?
New Landing › How can we help? › Themeforest Theme Support › Flexform › Excerpt length for Home page blog items?
- This topic has 7 replies, 2 voices, and was last updated 11 years by laranz – SUPPORT.
-
Posted in: Flexform
-
September 5, 2013 at 11:56 pm #20198
Hello!
I’m trying to change the excerpt length for Home page blog items. I saw the post about editing functions.php line 1202:
function new_excerpt_length($length) {
return 60;
}However that didn’t seem to work. I want it to work without a custom excerpt and when using either the standard editor and the Swift Page Builder. I’ve looked through the various php files that define excerpt lengths and can’t seem to pinpoint the correct one(s).
Thanks in advance for your help!
September 6, 2013 at 10:04 pm #20375Hi,
We have separate functions for excerpts like function excerpt around #1184 in functions.php and function custom_excerpt in line #1210 in functions.php If you want them to affect globally go to that function and inside that assign the $limit to your desired value.
Or if you want in a particular place like the post carousel or recent posts or somewhere, let me know which place I can let you which place to edit the value.
Hope this helps.
Thanks,
laranz.September 6, 2013 at 11:16 pm #20387I’ve looked through functions.php and changed the ‘200’ from the ’60’ that was there previously – this code is from Flexform 1.5 lines 1247-1253:
/* EXCERPT ================================================== */ function new_excerpt_length($length) { return 200; } add_filter('excerpt_length', 'new_excerpt_length');
That didn’t change anything though. The site is now live at:
I’m trying to change the excerpt length on the Home page blog posts. I want it to pull from the content and NOT use a custom excerpt.
Thanks!
September 8, 2013 at 9:10 pm #20549Hi,
Did you try manually split the content using more tags? Did you follow the things I said in the previous posts?
Thanks,
laranz.September 8, 2013 at 9:40 pm #20557Yes, I read what you wrote, but see nothing about excerpts or $limit in either area – ‘Around line #1184’ in functions.php is the last line of the ‘/* Content Return Functions’. Line #1210 is a line in the middle of the ‘/* CATEGORY REL FIX’ section. Are we referencing the same functions.php file from the root of the Flexform 1.5 theme folder?
I can’t, nor do I want to, split the content manually – this needs to be auto-generated, as the client is not savvy enough nor will even remember to have to manually split it.
I’ve attached a screenshot of what I’m referring to – the excerpt next to the post thumbnail, which starts with ‘Two red eyes later..’ needs to be longer. Instead of ~20 words, it needs to be ~60.
The site is set up to ‘latest posts’ in the Settings>Reading section if that’s of any help.
Thanks!
September 8, 2013 at 11:30 pm #20576Hi,
Send me the login details using the “Set as private reply” below, I will edit that for you. to make 20 to 60.
or goto includes\swift-framework\sf-content-display\sf-post-formats-3.6.php line #249
function sf_get_post_item($postID, $blog_type, $show_title = "yes", $show_excerpt = "yes", $show_details = "yes", $excerpt_length = "20", $content_output = "excerpt", $show_read_more = "no") {
change the excerpt length from 20 to 60.
Let me know, what you got.
Thanks,
laranz.September 14, 2013 at 2:02 am #21828That was it! Thanks!
One note – the location was actually includes/sf-content-display/sf-post-formats.php
September 14, 2013 at 3:12 am #21843Hi,
Glad you found it useful 🙂
Thanks,
laranz. -
Posted in: Flexform
You must be logged in to reply to this topic.