Gallery Masonry Category

Description

08.26c29v4 Gallery Masonry Category

#1. Install Code

#1.1. Make sure you use Gallery Grid: Masonry

08.26c29v4 Gallery Masonry Category

#1.2. Make sure you enabled Caption + enter text: masonry-category in Anchor Link

08.26c29v4 Gallery Masonry Category

#1.3. Hover on top right of gallery > Click EDIT GALLERY

08.26c29v4 Gallery Masonry Category

#1.4. Enter category text, use this format: Category: category1, category2…

ex: Category: Dance + Theatre

08.26c29v4 Gallery Masonry Category

or: Category: Film

08.26c29v4 Gallery Masonry Category

or: Category: Web Design

08.26c29v4 Gallery Masonry Category

#1.5. Hover on Page where you use Gallery Masonry > Click Gear icon

08.26c29v4 Gallery Masonry Category

#1.6. Click Advanced > Paste this code

  • If you use Personal/Basic Plan and your plan doesn’t support Injection, see #3.1
<!-- 08.26c29v4 Gallery Masonry Category -->
<script>
window.GalleryMasonryCategoryOptions = {
  sectionKeyword: 'masonry-category',
  allText: 'All',
  categoryOrder: [],
  multipleSelect: false,
  filterGap: 10,
  filterSpacing: 0,
  buttonPaddingVertical: 10,
  buttonPaddingHorizontal: 20,
  buttonFontSize: 14,
  buttonBackground: '#ffffff',
  buttonColor: '#000000',
  buttonBorderWidth: 2,
  buttonBorderColor: '#000000',
  buttonBorderRadius: 4,
  hoverBackground: '#f0f0f0',
  hoverColor: '',
  hoverBorderColor: '',
  activeBackground: '#000000',
  activeColor: '#ffffff',
  activeBorderColor: '',
  rowGap: 10,
  fadeDuration: 300
};
</script>
<script src="https://code.beaverhero.com/gallerysmasonry/0826c29v4gallerymasonrycategory.js"></script>

08.26c29v4 Gallery Masonry Category

#2. Customize

#2.1. To remove or rename text “All”, you can change line 05

allText: 'All',

to remove it, just change it to this

allText: '',

#2.2. To change category filter button style, change line 10 – 23

buttonPaddingVertical: 10,
buttonPaddingHorizontal: 20,
buttonFontSize: 14,
buttonBackground: '#ffffff',
buttonColor: '#000000',
buttonBorderWidth: 2,
buttonBorderColor: '#000000',
buttonBorderRadius: 4,
hoverBackground: '#f0f0f0',
hoverColor: '',
hoverBorderColor: '',
activeBackground: '#000000',
activeColor: '#ffffff',
activeBorderColor: '',

#2.3. To change gap between filter category buttons

08.26c29v4 Gallery Masonry Category

change line 08

filterGap: 10,

#2.4. To change order of category filter buttons, change line 06

categoryOrder: [],

for example

categoryOrder: ['Film', 'Music', 'Web Design', 'Dance + Theatre', 'Other'],

result

08.26c29v4 Gallery Masonry Category

#2.5. If you need to tweak more you can use this AI Assistant (designed for Squarespace sites)

#3. Other

#3.1. If you use Personal/Basic Plan and your plan doesn’t support Injection, you can edit current page (page where you use Gallery Grid Masonry) > Add a Block > Choose Markdown

04.26c10v2 Header Sound Icon

Add this code into Markdown

<script>
window.GalleryMasonryCategoryOptions = {
  sectionKeyword: 'masonry-category',
  allText: 'All',
  categoryOrder: [],
  multipleSelect: false,
  filterGap: 10,
  filterSpacing: 0,
  buttonPaddingVertical: 10,
  buttonPaddingHorizontal: 20,
  buttonFontSize: 14,
  buttonBackground: '#ffffff',
  buttonColor: '#000000',
  buttonBorderWidth: 2,
  buttonBorderColor: '#000000',
  buttonBorderRadius: 4,
  hoverBackground: '#f0f0f0',
  hoverColor: '',
  hoverBorderColor: '',
  activeBackground: '#000000',
  activeColor: '#ffffff',
  activeBorderColor: '',
  rowGap: 10,
  fadeDuration: 300
};
</script>
<script src="https://code.beaverhero.com/gallerysmasonry/0826c29v4gallerymasonrycategory.js"></script>

08.26c29v4 Gallery Masonry Category

Buy me a coffee