Change font size of specific words in Slider title

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); 
}

 

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

Comments are closed.