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

I would like to change the style of h1, h2, ... ONLY in post entry (when writing a new post).

enter image description here

Default settings is just too big and has a different format, because I use Google fonts. I was using just bbcode for writing articles and want to start using the headings in articles.

The best solution would be to have the same format as used Google font on the site, but just use bold and different size.

share|improve this question
It's not really clear what's the goal. What's the effect this should have in the front end? And why only in new posts? – brasofilo Apr 3 '13 at 15:54
I just want to change the attributes of each heading style. For ex.: Heading 1 - font size 15px; bold type Heading 2 - font size 12px; . . . Not only new posts, all post. But it will affect only the new posts because I did NOT use the headings until today. And dont want to affect the Page titles ;-) – Vasek Hajek Apr 3 '13 at 16:01
Well, does @Milo Answer works for you? If not, it's for lack of clarity/details in your Question... – brasofilo Apr 3 '13 at 16:03
I believe this is a pure CSS question... – vancoder Apr 3 '13 at 16:24

You can change the styling of the editor content with your own CSS stylesheet via the add_editor_style function:

function wpa_add_editor_styles() {
    add_editor_style( 'custom-editor-style.css' );
add_action( 'init', 'wpa_add_editor_styles' );

Then in your stylesheet, add your rules:

body#tinymce.wp-editor h1 {
    font-size: 50%;
share|improve this answer
Is there any option to edit just the css file? I have defined this in css: pastebin.com/Wf2i5YRW I mean just add few code to the bottom of the css. Something like this: h1 { font-size: 24px; } – Vasek Hajek Apr 3 '13 at 16:17
I'm not clear on what you're trying to change. Those styles look like they are for the front end, this is for changing what text looks like in the back end- only the editor, not what visitors see. – Milo Apr 3 '13 at 16:22
Finally, I have found it here: h1,h2,h3,h4,h5,h6{font-weight:bold;} h1{font-size:20px;line-height:30px;} h2{font-size:18px;line-height:26px;} h3{font-size:14px;line-height:24px;} h4{font-size:14px;line-height:20px;} h5{font-size:14px;line-height:20px;} h6{font-size:14px;line-height:20px;} anyway, thanks – Vasek Hajek Apr 3 '13 at 16:37

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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