Customize specific part on post in title on front page – WordPress news site

Please help me solve my problem. I want to make this as in the picture, more precisely I want to highlight one part of the title on the home page and in the post when you open it. Is there a plugin on wordpress or something similar? The theme of my site is NEWSPAPER. I tried everything but it didn’t work

  1. If it’s a mouse hover effect or any other visual modification, you would need to know basics of CSS in order to do it.

  2. This can be done, but probably not easily.

    You might be able to use jquery:

    var text= $(this).text().trim().split(” “);
    var first = text.shift();
    return (text.length > 0 ? “<span class=’red’>”+ first + “</span> ” : first) + text.join(” “);

    and modify it to loop through your class selector (e.g. )

    For a function – I think you’ll have to use the pre_get_posts filter – and extract the first word, wrap it in a span with a class, and re-inject it into the title. Or do it directly by outputting in-line css.

    Otherwise, you could create a child theme, and edit the archive.php file and add the span-injection there.


This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Your Advertisement Here