WordPress.org

Ready to get started?Download WordPress

Forums

Spun
Gallery Post Format: Link with File (2 posts)

  1. ccpowered
    Member
    Posted 1 year ago #

    Hey Caroline,

    I am very happy with your theme, but now I am wondering, how to change the linking with your gallery template.
    The featured images are shown correctly, but when I click on them I am redirected to a new page, which displays the picture.

    Is there a way to link directly to the file? I'd like to use a lightbox plugin with this feature...

    Philipp

  2. Caroline Moore
    Member
    Theme Author

    Posted 1 year ago #

    Hi! Since the gallery in the Gallery post format uses specific settings, you can override them by copying the content-gallery.php template file into a child theme. Change the do_shortcode() function on line 11 to include the gallery features you want -- for example, to link to the image (instead of the attachment page) you'd add this to the shortcode syntax:

    link="file"

    Read more about the shortcode and how to use it here:
    http://codex.wordpress.org/Gallery_Shortcode

    As to how to get it to work with a Lightbox plugin, that's up to the plugin and how it handles WordPress galleries.

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic