The excerpt length on the older two and four-column widgets has a threshold set of 90 characters if an image is also displayed. This is to keep the blocks from being overly tall or causing a “stagger” effect from some excerpts not being long enough to create balance. If you add an excerpt length that is more than 90 characters, it is obviously ignored because of this.
This is considered a modification, and is provided as-is. We expect you understand what you are doing if applying coding changes using these or other WordPress tutorials. Make a backup of your existing file so you can replace it if something goes wrong and you need to start over. Modified files WILL probably be replaced by a theme update at some point, so keep note of your changes for future reference or see our guides below. We cannot assist you with modifying your theme or support problems you encounter as a result!
If you are modifying a theme as part of a client project, the following are really important!How to Modify Your Theme the Right Way
How to Track Update Changes and Maintain Modifications
- Backup your theme if you have a child theme or modifications you don’t want to lose if something goes wrong here.
- Download and install the Solid Code Theme Editor plugin under Plugins > Add New, then access it from Appearance > SC Theme Editor and browse to ocmx and click on four-column-widget.php
- Remove line 80 except for the ?> (Note that this is using Knead as an example, line numbers may vary in other themes but the conditional statement you need to remove is the same)
80 if( $show_images != "on" || $image == "" ) : $excerpt_length = 90; else : $excerpt_length = 75; endif;
You should now have:
$image = get_obox_media( $args ); ?> <li>
4. Click Update File