• Hi Kharis,

    I hope you are keeping well.

    Regarding https://businessowl.co.uk/devel/, where I have the title ‘Green Pledge’, is it possible to make the word ‘green’ appear in green colour? Could you help me with the code to do this please? I am only looking to change the colour of one word though, not the whole section.

    Many thanks,
    Jen

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi Jen,

    Try adding this custom function to your child theme’s functions.php file

    function moesia_child_function_update_color() {
        ?>
    	<script type="text/javascript" id="custom-footer-script">
    		jQuery(function($){
    
    		  $(".widget_moesia_blockquote .widget-title > span").html(function() { 
    			return $(this).html().replace("Green", "<span style='color:green;'>Green</span>");  
    		  });
    
    		});		
    	</script>	
    	<?php
    }
    add_action( 'wp_footer', 'moesia_child_function_update_color' );
    Thread Starter JenniferCross

    (@jennifercross)

    Hi Kharis, thanks for this – is there some code I could add to CSS rather than the child theme?

    Thanks very much,
    Jen

    Hi Jen,

    Thank you for the question.

    To apply your own additional functions without child theme, you can use code snippets plugin that you can find in the plugins directory.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Changing colour of part of a title’ is closed to new replies.