WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This question already has an answer here:

I want to give the "italic" button back the "styling" behaviour, rather than the spammy <em>. I want that button to print a <i> tag, rather than <em>.

<em> tags became popular to spam search engines, but now I want it to be what it is: a styling feature to e.g. change the voice of the narration.

I've got a script to create my own styles, so I'll include the <em> tag there, to use it as what it REALLY is: EMPHASIS. I'll then style it accordingly (big, bold).

So now my problem is, I'm sure I can find the setting / string / parameter to hack in JavaScript, but... Do you know a way to hook it from / for WordPress?

share|improve this question

marked as duplicate by Pieter Goosen, toscho Dec 12 '14 at 12:52

This question was marked as an exact duplicate of an existing question.

Have you read wordpress.stackexchange.com/questions/66724/…? – toscho Oct 24 '12 at 9:13

Here's a simple function that will replace <em> with <i> on your post/page:

function replace_em_with_i($content) {
$content = str_replace('<em>', '<i>', $content);
$content = str_replace('</em>', '</i>', $content);
return $content;

add_filter('the_content', 'replace_em_with_i');

Warning: I have tested the code to check if it works (and it does work), but you might want to do some serious testing before using it...

Using a similar function you can replace <strong> with <b>, and so on.

I hope this helps...

share|improve this answer
I do not think this is what the user wants - they clearly state that they wish to be able to use both tags, but have the editor button insert an <i> tag. – shea Mar 15 '14 at 3:47

Not the answer you're looking for? Browse other questions tagged or ask your own question.