• Job: change the default style for [gallery] short code
    Problem: cannot do this via function in function.php file

    function change_gallery_css()
    {
    	return "<style type='text/css'>
    		.gallery img {border: 10px solid #cfcfcf;}
    		</style>";
    }
    add_filter('post_gallery', 'change_gallery_css');

    I tested the 'gallery_style' tag instead of 'post_gallery' with no luck.

    Please point my mistake.
    Thanks in advance for any help.

The topic ‘Gallery short code custom style’ is closed to new replies.