New Landing How can we help? Themeforest Theme Support Flexform Excerpt length for Home page blog items?

Viewing 8 posts - 1 through 8 (of 8 total)
  • Posted in: Flexform
  • #20198
    Tekguild
    Member
    Post count: 171

    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!

    #20375
    laranz – SUPPORT
    Member
    Post count: 3186

    Hi,

    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.

    #20387
    Tekguild
    Member
    Post count: 171

    I’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:

    http://urbanbackpacker.com

    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!

    #20549
    laranz – SUPPORT
    Member
    Post count: 3186

    Hi,

    Did you try manually split the content using more tags? Did you follow the things I said in the previous posts?

    Thanks,
    laranz.

    #20557
    Tekguild
    Member
    Post count: 171

    Yes, 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!

    #20576
    laranz – SUPPORT
    Member
    Post count: 3186

    Hi,

    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.

    #21828
    Tekguild
    Member
    Post count: 171

    That was it! Thanks!

    One note – the location was actually includes/sf-content-display/sf-post-formats.php

    #21843
    laranz – SUPPORT
    Member
    Post count: 3186

    Hi,

    Glad you found it useful 🙂

    Thanks,
    laranz.

Viewing 8 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic.