Gallery php code location? (3 posts)

  1. ghaib
    Posted 6 years ago #

    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)


  2. esmi
    Forum Moderator
    Posted 6 years ago #

    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');
  3. ghaib
    Posted 6 years ago #

    Thanks, that did it.

    What does the "native shortcode" accomplish for you?

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.