Hey Bob,
Those are very specific changes. Their Pro version doesn’t seem to support what you need.
To change excerpt length, you can use the following function:
function custom_excerpt_length($length) {
return 100;
}
add_filter('excerpt_length', 'custom_excerpt_length');
You can change 100 to whatever word count you want.
For the ellipsis, I don’t know if that’s possible. But, usually, excerpts come with a “continue reading” or “read more” link at the end. You can add this using the following function:
function custom_excerpt_more($more) {
global $post;
return '... <a href="' . get_permalink($post) . '">Continue reading</a>';
}
add_filter('excerpt_more', 'custom_excerpt_more');
One important thing I would mention is a child theme, before making any changes to the original theme. Any changes to the original theme’s code will be lost when there is a new update. This is why it’s important to activate a child theme, which relies on the parent theme but allows us to customize the theme code as needed.
I’ve created a simple child theme and added the above code to the functions.php
file:
digital-garden.zip (1.8 KB)
Just upload it as a regular theme and activate it. Minimalist Blog theme must remain installed.
You can edit your functions.php
by going to Appearance › Editor. It will look like this:
You will also see “Stylesheet” on the list. This is your style.css file, where you can add any custom CSS you want.
Very important to remember editing functions.php
can break the website if there is an error in the code. The breakage isn’t permanent. You just need to go through your hosting cPanel › File Manager, and find the functions.php
file to remove the bad code.