WordPress.org

Ready to get started?Download WordPress

Forums

Gallery php code location? (3 posts)

  1. ghaib
    Member
    Posted 4 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)

    Thanks!

  2. esmi
    Theme Diva & Forum Moderator
    Posted 4 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:

    remove_shortcode('gallery');
    add_shortcode('gallery', 'theme_gallery_shortcode');
  3. ghaib
    Member
    Posted 4 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

Tags

No tags yet.