ThemeShaper Forums » Thematic

How can I italicize certain words in headings?

(3 posts)
  • Started 1 year ago by rysch
  • Latest reply from rysch
  • This topic is not resolved

Tags:

  1. Okay, this may be a CSS or PHP question or both.

    Basically the idea is this: I have my headings that are multiple words. I want to italicize little words like "a, the, and, of, an, in" etc.

    I have done it with a few of my headings that are hard coded into the Thematic Feature Site by adding span classes around the words I want to italicize.

    But how would I do this with other headings for posts and pages that are generated automatically by the PHP functions? Is there any solution other than having to manually enter the headings in HTML and adding span classes?

    Thanks for any help.

    Posted 1 year ago #
  2. have you tried putting a span in title when you name the post via WP?

    A <span style="color:red;">Video</span>Post

    this works, but it has the downside of looking like crap in your backend.

    if you only want to do it for the little words, i think you could maybe filter the blog title and do a str_replace around any matched words. no idea if this will work, but i gene showed me something similar that i used on filtering a widget class

    function child_post_title($posttitle) {
         $posttitle = str_replace('is', '<em>is</em>', $posttitle);
         return $posttitle;
    }
    add_filter('thematic_before_widget_area', 'child_post_title');
    Posted 1 year ago #
  3. Thanks! I think this might just work!

    Posted 1 year ago #

RSS feed for this topic

Reply

You must log in to post.