WordPress.org

Support

Support » Requests and Feedback » W3C error with wordpress gallery feature

W3C error with wordpress gallery feature

  • When inserting a gallery from the media link in the add/edit page section my site comse up as NOT W3C complient, the error i get is <style> isn’t allowed in <div> elements. what word press seems to be doing ins putting a style with in a div tag ( if there is on there). the gallery feature installs a style tag where ever the gallry is inserted creating this W3C error. is ther a fix for this and a diffrent way to use it so it doent happen?

Viewing 1 replies (of 1 total)
  • esmi

    @esmi

    Forum Moderator

    Try adding:

    // remove gallery css
    add_filter('gallery_style', create_function('$a', 'return "
    <div class=\'gallery\'>";'));

    to your theme’s functions.php file. However, you will then have to add some basic gallery styling to your theme’s stylesheet.

Viewing 1 replies (of 1 total)
  • The topic ‘W3C error with wordpress gallery feature’ is closed to new replies.