12% off of LTD using this coupon: TWELVEPERCENTOFF. Promo ends on 2 Dec midnight UTC.
Published on Mar 27, 2022

Manual Related Posts in Oxygen using Meta Box

Sridhar Katakam

This members-only tutorial provides the steps to show posts marked as related for posts and show them on singular post pages using Meta Box and a Repeater (or Easy Posts) using Advanced Query in Oxygen.

We shall

  • create a field group having a "Post" type of custom field with "Multiple" checked
  • create a custom function that returns a comma-separated string of related post IDs
  • set the above string as the value of post__in query parameter

Step 1

Create the field group with an ID of say related_posts.

Set the group's location to post post type.

Step 2

Edit your posts and select related posts for each.

Step 3

Install and activate Code Snippets plugin.

Go to Snippets > Add New.

Title: [Function] Get IDs of Related Posts

Code:

This is a premium members-only content.

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

Already a member? Log in below or here.

tagschevron-leftchevron-rightchainangle-rightangle-upangle-downfolder-omagnifiercrossmenuchevron-downarrow-right