WordPress.org

Ready to get started?Download WordPress

Forums

add_editor_style function not working (WP 3.3) (3 posts)

  1. pulk99
    Member
    Posted 2 years ago #

    Hi,

    I've added the following line to my themes functions.php

    add_editor_style('editor-style.css');

    I can see in the page source that the file is included:

    content_css:"http://mydomain.com/wp-content/themes/mytheme/editor-style.css"

    the path is correct, if I copy the URL and paste it in the browser, I can see the file.

    But I dont get the styles in the editor dropdown, they don't show up, I tried different browser, clearing cache,.... I read various posts with people having the same problem, but no fix for it.
    I don't use child themes, wp is a new 3.3. install, I have no plugins wich change editor behaviour.

    Any ideas?

  2. Darin Kotter
    Member
    Posted 2 years ago #

    The only thing I can think of is are you targeting the right elements in your CSS? I know I add some styles to the login page, and after the upgrade to 3.3 those styles didn't show up anymore. The problem was the default stylesheet from WordPress had changed how they targeted elements, so I had to change my styles to match so they overrode the default styles. Not sure if that's what's going on here but it might be.

  3. Tammy Hart
    Member
    Posted 2 years ago #

    pulk99,

    This function doesn't add styles to a dropdown, it changes the style of the content of the post editor. It's nice for making your editor content match what the content will look like on the front end of the site as best as you can. Take a look at what the Twenty Eleven theme does for a good example.

Topic Closed

This topic has been closed to new replies.

About this Topic