Minimalist Blog theme?

Hello folks. Brand new CP user here. I love it because of the old school WP feel. I’ve launched a personal website (digital garden style) and am now using the Minimalist Blog theme. I do like the look, but the few things I’m trying to do don’t seem obvious on their free version. For instance, trying to set the length of the displayed post before going to the full post and then activating the ellipsis as a link to the full post.

The documentation is almost non-existent, and the Pro version is $39. Am I crazy to use this? Is there a free minimal theme that just works well with CP that I should be looking at instead?

Thanks!

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.

2 Likes

Wow. That’s all I can say. I really never expected anyone to give me code to make these changes! A million thanks! I will try this out.

I’ve never monkeyed with theme code before, so I’m a bit nervous about breaking stuff.

Having said that, this ClassicPress community is pretty amazing.

3 Likes

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.