This members-only tutorial provides the steps to display a WordPress Gallery in Oxygen from the images uploaded to Pages using Meta Box and GLightbox.

FYI: Meta Box is currently running a LTD (lifetime deal) sale at Appsumo. The complete package for unlimited sites for lifetime access with support costs $150. Get Meta Box (affiliate link)

Step 1

Install and activate either Meta Box AIO.

Go to Meta Box > Custom Fields and add a new field group of the type "Image Advanced".

In the Settings area, select the desired location where you want to attach the field group to.

In this example, let us set it to appear on all static Pages.

Step 2

Edit your Page(s) and populate the field.

Step 3

Register a custom size for the images in the gallery.

Install and activate Code Snippets plugin.

Go to Snippets > Add New.

Title: Custom image sizes

Code:

add_image_size( 'gallery-image', 600, 338, true ); // 16 x 9

Set the snippet to run everywhere. Save changes and activate.

If you are going to use images that are already present in the Media Gallery, regenerate thumbnails.

Step 4

Let us specify that the HTML output of WordPress galleries and other elements be in HTML5.

Add another code snippet.

Title: Add support for HTML5 markup

Code:

add_theme_support( 'html5', array( 'comment-list', 'comment-form', 'search-form', 'gallery', 'caption' ) );

Step 5

Edit the Oxygen Template that applies to all the static Pages with Oxygen.

Add a Section where you would like to show the Page Gallery - say, below the content.

Add a Heading that reads something like "Gallery".

Add a Code Block.

Set its width to 100%.

PHP & HTML:

This is a premium members-only content.

To view the rest of the content, please sign up for membership ($47/month or $399 one-time).

Already a member? Log in below or here.

Need help implementing a tutorial in your site or want to hire me for custom work?

HIRE ME

Find the article helpful and wish to donate?

DONATE

Comments

You need to be logged in to view and post comments.
Not a member yet? Join here.
magnifiercross
linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram
%d bloggers like this: