Skip to content
This repository has been archived by the owner on Sep 16, 2019. It is now read-only.

How do I support the built in WP Gallery in Foundationpress #937

Closed
nitrokevin opened this issue Jan 22, 2017 · 4 comments
Closed

How do I support the built in WP Gallery in Foundationpress #937

nitrokevin opened this issue Jan 22, 2017 · 4 comments

Comments

@nitrokevin
Copy link

How can this bug be reproduced?

  1. Create Gallery in Wordpress Media
  2. Gallery displays in columns in the content editor
  3. Gallery displays as a list of images in the published page

Please List the Following:

  • OS & version: Mac 10.12.1
  • Node version (node -v) [Node v4+ is required] : 6.2
  • Foundation version (bower list) : 6.3

I can create image galleries using ACF gallery plugin, but if I try to use the built in WP gallery so I can include a gallery easily in the content editor I'm not sure how to add support for this in foundationpress

@walkerdigital
Copy link

+1

@walkerdigital
Copy link

walkerdigital commented Jan 22, 2017

I added a partial called _gallery.css in /assets/scss/components with:

.gallery
 {
  
  @include grid-row();

    &.gallery-columns-2 {
      @include breakpoint(small) {
        .gallery-item {
          @include grid-column(12);
        }
      }
       @include breakpoint(medium) {
        .gallery-item {
          @include grid-column(6);
        }
      }
   }

    &.gallery-columns-3 {
      @include breakpoint(small) {
        .gallery-item {
          @include grid-column(12);
        }
      }
       @include breakpoint(medium) {
        .gallery-item {
          @include grid-column(4);
        }
      }
    }

    &.gallery-columns-4 {
      @include breakpoint(small) {
        .gallery-item {
          @include grid-column(12);
        }
      }
       @include breakpoint(medium) {
        .gallery-item {
          @include grid-column(3);
        }
      }
    }

    &.gallery-columns-6 {
      @include breakpoint(small) {
        .gallery-item {
          @include grid-column(12);
        }
      }
       @include breakpoint(medium) {
        .gallery-item {
          @include grid-column(2);
        }
      }
    }

    .gallery-item {
      padding: 1rem;
    }
}

Then I included the import in foundation.scss

@import "components/gallery";

This seemed to do the job for me. This is a copy of the cards example scss.

@nitrokevin
Copy link
Author

Thanks I'll give this a go

@nitrokevin
Copy link
Author

That worked thank you.

I don't suppose there is any way to get the inbuilt gallery to use interchange instead of selecting the image size

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants