Change font size of specific words in Slider title

⚠️ Code snippets might not be compatible with the latest version of your theme. Always use a child theme to customize your theme, and test your code on a staging website before migrating to production.

You can search the user’s forum or ask the user community by opening a new thread in the Customizr theme forum. Before opening a new topic, you might want to follow the troubleshooting steps..

The slider of the Customizr theme is used to attract attention to certain important posts. What if you want to give emphasis to some words in the Slider title, for instance, ‘FREE‘? Can you enlarge specific words in the title?

To achieve this effect, just paste this to your child theme’s functions.php.

 

/************************************************************************/ 
/* Change font size of specific words in Slider title 
/************************************************************************/
add_filter('tc_slide_title', 'my_slide_title');
function my_slide_title($content){
    /* Adjust font-size and change word to suit your needs */
    return str_replace('FREE','<span style="font-size: 200%;">FREE</span>',$content); 
}

 

Leave a comment

Your email address will not be published. Required fields are marked *

2 thoughts on “Change font size of specific words in Slider title”