ThemeGrill Colormag theme modifications

Colormag is a great news/magazine style theme for WordPress. As of this post, it has over 100,000 active installs. The free version is loaded with features and functionality so its easy to see why so many people use it.

Although it isn’t installed on this website I do use it on two community news websites. There were a few customizations that had to be made before it would work the way I wanted though. These are mostly aesthetic changes to improve the user experience.

This post will go over some of the modifications I made to the free version of the theme and how to implement them on your website. These changes were made to Colormag version 1.3.8. If your version is different the instructions below may not work. (I have used these modifications for the last several versions so I expect them to continue working just fine.) To check the version of your theme go to Appearance > Themes then hover over the theme and click Theme Details. If your theme is older than 1.3.8 you should update it to take care of any bug fixes or security issues older versions may have.

Before making any changes to your theme files make sure to backup your website. I recommend UpdraftPlus, it’s a robust and easy to use backup solution for WordPress.

Remove “Powered by WordPress” and “Theme: ColorMag by ThemeGrill” from footer

Removing “Powered by WordPress” and the theme label in the footer is a common request for WordPress. Some people want their websites to “look less like a WordPress website.”

The Colormag theme has a label at the bottom that says “Theme: ColorMag by ThemeGrill. Powered by WordPress.” Depending on the look you are trying to achieve with your website you may want to remove this from the footer. I removed it from the news sites because it gives the footer a cleaner look.

WordPress and theme info in the footer.

To remove “Powered by WordPress” and “Theme: ColorMag by ThemeGrill” from the footer:

  • Go to your WordPress dashboard > Appearance > Theme Editor.
  • On the Edit Themes page find the Theme Files column on the right.
  • Go to inc > functions.php
  • Find line 550

Change this: 

$default_footer_value = sprintf( __( 'Copyright © %1$s %2$s. All rights reserved.', 'colormag' ), date( 'Y' ), $site_link ) . '<br>' . sprintf( __( 'Theme: %1$s by %2$s.', 'colormag' ), 'ColorMag', $tg_link ) . ' ' . sprintf( __( 'Powered by %s.', 'colormag' ), $wp_link );

To this:

$default_footer_value = sprintf( __( 'Copyright © %1$s %2$s. All rights reserved.', 'colormag' ), date( 'Y' ), $site_link );

The footer will now have the WordPress and theme labels removed.

WordPress and theme info removed from footer.

Display captions on featured images

Captions don’t display under a post’s featured image with Colormag. But this can be easily changed. By default when you view a post the caption will not display under the featured image.

To make captions appear under the featured image of posts:

  • Go to your WordPress dashboard > Appearance > Theme Editor.
  • On the Edit Themes page find the Theme Files column on the right.
  • Go to content-single.php
  • Find line 28.

Add the following code.

<div class="caption-content">
          <?php if ( $caption = get_post( get_post_thumbnail_id() )->post_excerpt ) : ?>
          <p class="caption"><?php echo $caption; ?></p>
<?php endif; ?></div>

When captions are added to featured images in the Media Library they will now appear under the image when viewing the post.

Add … (ellipsis) to Featured Post widgets

When using the Colormag Featured Posts widgets one post will be displayed with an excerpt from the post while the other posts in that widget will not. The problem is the excerpt just cuts off, there is no … (ellipsis) to let the reader know there is more text. If the excerpt stopped at the end of a sentence it wouldn’t be too bad, but it doesn’t. It stops after a predetermined number of characters.

To fix this you can add … to the end of the excerpt so it is clear there is more text. To do so:

  • Go to your WordPress dashboard > Appearance > Theme Editor.
  • On the Edit Themes page find the Theme Files column on the right.
  • Go to inc > functions.php
  • Find line 101.

Change this:

return '';

To this:

return ' ...';

Now the excerpts will end with an ellipsis.

Add a read more button to Featured Post widgets

In addition to the … (ellipsis) mentioned above, the excerpt in the Featured Post widgets could use a “Read More” button. This, along with the ellipsis makes it clear to the users of your website that there is more to the post. Instead of the text ending abruptly mid sentence. 

To add a “Read More” button to the excerpts of the Feature Post widgets:

  • Go to your WordPress dashboard > Appearance > Theme Editor.
  • On the Edit Themes page find the Theme Files column on the right.
  • Go to inc > widgets > colormag-featured-posts-widget.php
  • Find line 176.

Change this:

<?php the_excerpt(); ?>

To this:

<?php the_excerpt(); ?> <a class="more-link" title="<?php the_title(); ?>" href="<?php the_permalink(); ?>"><span><?php _e( 'Read more', 'colormag' ); ?></span></a>

The theme has two widgets these changes can be made to. The steps above modify the Featured Posts widget. There is also a Featured Posts Vertical widget that has a slightly different layout but will also benefit from the “Read More” button. To change the Featured Posts Vertical widget:

  • Go to inc > widgets > colormag-featured-posts-vertical-widget.php
  • Find line 176.
  • Change the code shown above.

Now both the Featured Post widget and Featured Posts Vertical widget will have a “Read More” button.

The Colormag theme is already a great theme and with a few modifications you can create an even better experience for the visitors of your WordPress website.

Do you have any modifications not mentioned above? Tell me in the comments. 

4 thoughts on “ThemeGrill Colormag theme modifications”

  1. hi, how to remove the : ColorMag: colormag-300×250-advertisement-widget.php (inc/widgets/colormag-300×250-advertisement-widget.php)
    on my footer

Comments are closed.

Deprecated: Directive 'allow_url_include' is deprecated in Unknown on line 0