Skip to content
This repository has been archived by the owner on Nov 21, 2023. It is now read-only.

Gallery viewer which supports images, panoramas, maps, SoundCloud and Vimeo

Notifications You must be signed in to change notification settings

dotherightthing/wpdtrt-gallery

Repository files navigation

DTRT Gallery

GitHub release Build Status GitHub issues

Gallery viewer which supports images, panoramas, maps, SoundCloud and Vimeo.

Setup and Maintenance

Please read DTRT WordPress Plugin Boilerplate: Workflows.

WordPress Installation

Please read the WordPress readme.txt.

WordPress Usage

The plugin shortcode is automatically injected into the content and wraps all <h2> headings.

Note: A WordPress gallery must immediately follow the <h2> heading.

Display the gallery viewer

Within the content area

When the plugin is enabled, DTRT Gallery replaces the existing WordPress [gallery] shortcode. For correct display please set [gallery link="file"].

Galleries added via the WordPress WYSIWYG will automatically be enhanced. For correct display please set Gallery Settings > Link To: Media File.

If a heading has no adjacent gallery, it will automatically be wrapped in [wpdtrt_gallery_shortcode_heading].

Outside the content area

Headings may be manually wrapped in [wpdtrt_gallery_shortcode_heading], as a template tag:

<?php
    $heading = 'Heading to wrap';
    echo do_shortcode('[wpdtrt_gallery_shortcode_heading]<h2>' . $heading . '</h2>[/wpdtrt_gallery_shortcode_heading]');
?>

Styling

Core CSS properties may be overwritten by changing the variable values in your theme stylesheet.

See scss/variables/_css.scss.

Dependencies

  1. The WordPress content filter looks for galleries within the markup injected by DTRT Anchorlinks. It also uses the Heading level set in that plugin's admin screen.
<div class="wpdtrt-anchorlinks__section">
    <!-- h2, .gallery, etc -->
</div>

Demo pages

  1. Gallery with audio: Don't Believe The Hype - Day 13
  2. Gallery with map: Don't Believe The Hype - Rainbow Road - Day 1 (pending)
  3. Gallery with panorama: Don't Believe The Hype - Day 17
  4. Gallery with video: Don't Believe The Hype - Day 11