WordPress.org

Ready to get started?Download WordPress

Forums

Gallery -> Full Size and No link as default? (2 posts)

  1. hausjell
    Member
    Posted 1 year ago #

    I know it can be done with shortcode (the size part at least) but is there a way to set so all galleries created are:

    1) Default set to full size
    2) No link at at, images are only on the page and not "clickable" (I don't mean not actually able to be click but not linked to another page, area etc).

    It's a blog for funny pictures and stuff and I like to create posts with 10-20 images, adding each one manually is time consuming and I can see the gallery more or less can handle adding lot's of images.

    I hope what I have written makes sense!

  2. hausjell
    Member
    Posted 1 year ago #

    Nevermind, found the solution in media.php

    For anyone else wanting to do the same:

    Find:
    extract(shortcode_atts(array(

    Underneath you will see
    'size' => '',

    Replace with:
    'size' => 'full',

    Find:
    $link = isset($attr['link']) && 'file' == $attr['link'] ? wp_get_attachment_link($id, $size, false, false) : wp_get_attachment_link($id, $size, true, false);

    Replace with:
    $link = wp_get_attachment_image($id, $size);

    The result: You can upload multiple images, add to gallery and that's it - it will automatically create a 1 column gallery with full size images which are non linkable.

    Obviously not for everyone but it's what my site needed.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.