Support » Fixing WordPress » Gallery php code location?

  • When a gallery is posted into the post (the WP gallery — no plugin), the following code is automatically added after the gallery:

    <br style=”clear: both” /><br style=’clear: both;’ />

    Where in the WP files can you edit the php code in order to remove those two break lines? I’ve searched all the files and can’t find it anywhere.

    Note: this is not a plug-in, but the gallery that’s part of WP (2.8.4)


Viewing 2 replies - 1 through 2 (of 2 total)
  • Try wp-includes/media.php. Personally, I re-write the gallery shortcode function within my theme’s functions.php file and replace the native shortcode function using:

    add_shortcode('gallery', 'theme_gallery_shortcode');

    Thanks, that did it.

    What does the “native shortcode” accomplish for you?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Gallery php code location?’ is closed to new replies.