• Resolved vincedepalma

    (@vincedepalma)


    I am building a new theme, however after adding the WordPress sample content the theme no longer validates due to the inline styling from the sample gallery. anyone found a solution for this or know how to move the offending (style type=’text’) #xx (/style) above the (/head) ?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Try adding:

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

    to functions.php

    Thread Starter vincedepalma

    (@vincedepalma)

    thanks, that did the trick but now the gallery is completely un-styled. is there a way to have it just move the styles to the correct location before the (/head)?

    Not via a theme without completely re-writing the gallery shortcode. Try temporarily removing that filter and then view a gallery page. Grab a copy of the gallery CSS from the page source. Then replace the filter and add the copied gallery css to your stylesheet.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Sample content causing validation problems’ is closed to new replies.