Federico Jacobi

Coder + Designer

Great minds discuss ideas. Average minds discuss events. Small minds discuss people.

Foundation 6 + Block Grid + WordPress Gallery

If you are using foundation i’m sure you love block grids, but wordpress galleries do their own HTML. No worries, throw this snippet in your functions.php (or wherever it belongs in your theme’s structure) and the markup will change to a blockgrid instead. This works with Foundation 6 … for Foundation 5 you’ll need to change the output to UL and LIs instead of row/column DIVs.

Easy. You are welcome!

 

Comments

3 responses to “Foundation 6 + Block Grid + WordPress Gallery”

  1. Huw Rowlands Avatar
    Huw Rowlands

    This is perfect! Thank you so much.

  2. Branden Avatar
    Branden

    Thank you for this. Taking this and modifying to open in a modal window when picture is clicked. Saved me heaps of time!

    1. Andrew Avatar
      Andrew

      Branden were you able to adapt this to open in a modal? Here is my attempt however it is not working. Any idea why?

      [https://pastebin.com/J6Yu8mav]

Leave a Reply

Your email address will not be published. Required fields are marked *