WordPress.org

Support

Support » How-To and Troubleshooting » Gallery php code location?

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)

    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • esmi

    @esmi

    Forum Moderator

    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:

    remove_shortcode('gallery');
    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.
Skip to toolbar