In this tutorial I share a custom Page template for Genesis which when applied to a Page displays a 3-column grid of featured images of Portfolio custom post type with each thumbnail opening the full image in lightbox using Magnific Popup jQuery script. Clicking on any image displays the full image in a lightbox with left and right arrows for navigating to the rest of them as in a gallery. We are going to pass an array in which we set what type of entries should be fetched (a specific 'portfolio' CPT), how many of them (6) and that pagination should be supported, to genesis_custom_loop() inside a function hooked to genesis_loop so that the entries are displayed after or below the Page's content.
Step 1Upload jquery.magnific-popup.min.js to child theme's 'js' (create if not existing) directory. Create a file named say, magnific-popup-init.js to the same location having the following:
To view the full content, please sign up for the membership.
Already a member? Log in below or here.