This members-only tutorial builds and extends on top of the How to Exclude Current Post from Recent Posts in Oxygen tutorial to display the latest posts (excluding the current post) in a masonry style on single posts (can be of any post type) in Oxygen.
Let us register a custom image size for the featured images in the recent posts masonry grid.
Install and activate Code Snippets plugin.
Go to Snippets > Add New.
Title: Custom image sizes
add_image_size( 'recent-entry-image', 800, 0, true );
Set the snippet to run everywhere. Save changes and activate.
Add featured images for your posts that are at least 800px wide.
For the masonry effect to be prominent, use images of different heights.
Install and activate My Custom Functionality plugin.
Connect to your hosting account using a FTP client and navigate to site's /wp-content/plugins/my-custom-functionality-master.
Create a file named masonry-init.js in the plugin's assets/js directory having the following:
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.
Enter your email address to subscribe to this blog and receive notifications of new tutorials by email.
Join 485 other subscribers
Please log in again.
The login page will open in a new tab. After logging in you can close it and return to this page.