newboxters
Member
Posted 3 years ago #
In wp-includes/media.php
Line: 642 - 657
How to remove that css <style type='text/css'> what does show in the gallery for me to use the css of my theme? - That filter should use for not altering the file it media.php (because it can return to the normal after upgrade of WP).
Add this into functions.php
add_filter('gallery_style', create_function('$a', 'return "
<div class=\'gallery\'>";'));
scottoliphant
Member
Posted 2 years ago #
also, add this is your themes css:
<style type='text/css'>
.gallery {
margin: auto;
}
.gallery-item {
float: left;
margin-top: 10px;
text-align: center;
width: 33%;
}
.gallery img {
border: 2px solid #cfcfcf;
}
.gallery-caption {
margin-left: 0;
}
</style>
per:
http://sivel.net/2009/02/remove-gallery-style-tags-one-liner/