WordPress.org

Ready to get started?Download WordPress

Forums

Twenty Twelve
Custom gallery & image attachment template (2 posts)

  1. willio
    Member
    Posted 1 year ago #

    Hi —

    I'm creating a new template based on Twenty Twelve, and I enabled the gallery post format, and with it, created a new "content-gallery.php" file.

    The template defaults to using the same format for both archive (index) and single post mode, but my template will have a post thumbnail grids in archive (index) mode, and slider for the single gallery post view.

    I was able to create the first half of the template: gallery posts in thumbnail grids (I used 'postimage' function), but was not able to find a solution on how to render the (single) gallery post in the new carousel image mode (applicable using Carousel without Jetpack plugin) since twenty twelve theme would simply use the same 'content-gallery.php' file to render the gallery post format.

    Any help would be appreciated.

    Thanks.

  2. paulwpxp
    Font hero
    Posted 1 year ago #

    .. but was not able to find a solution on how to render the (single) gallery post in the new carousel image mode..

    Most lightbox scripts require the link to point directly to image file ( like http://example.com/path-to/image.jpg ) so you don't need to do anything with template, just make sure images are linked to the files when you make a gallery (WordPress's gallery).

    FYI with plain [gallery] shortcode, the default image's link is already set to file, but there is a bug in WP3.5 that's already fixed for 3.5.1
    http://core.trac.wordpress.org/ticket/22841

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic