• Resolved horsmanzach

    (@horsmanzach)


    Hi, I am aware there is a similar post about excerpt length posted a few days ago but it doesn’t look like there was a clear answer and I am having a similar issue.

    I’ve created a custom post type and am looking to update the excerpt length to be substantially longer than what it currently is in the CAF simple blog layout.

    I am using the Divi theme.

    Two different items I have attempted:

    1) copying over the index.php to my child theme and updating the value of where it says

    truncate_post( 270 );

    to a higher value. This did not work.

    2)

    I’ve also tried going to Divi -> Theme Options -> General, and enabled ‘Use excerpts when defined’, and wrote longer excerpts in the excerpt area of my custom post. This did not work

    Can you provide some insight on what needs to be done to change excerpt length? I’m not sure where it is pulling the current value from. Thank you

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Plugin Author Trusty Plugins

    (@trustyplugins)

    Hi @horsmanzach ,

    Thanks for the contact.

    Please use this filter to set the excerpt length.

    
    add_filter("tc_caf_excerpt_length",'trusty_exc_length');
    function trusty_exc_length () {
    	return 5;
    }
    

    You need to copy/paste this function to your active theme’s functions.php file.

    I hope it makes sense.

    Thanks,
    Trusty Plugin Team

Viewing 1 replies (of 1 total)
  • The topic ‘Changing Excerpt Length’ is closed to new replies.