12% off of LTD using this coupon: TWELVEPERCENTOFF. Promo ends on 2 Dec midnight UTC.
Published on Apr 18, 2020

ACF Post Object Field in Oxygen

Sridhar Katakam

This premium members-only tutorial provides the steps to use Advanced Custom Field's Post Object type of field to associate a product post type item to a Page and display this related product's info like title and image on the Page (not just in the Oxygen editor but also on the front end).

related_product custom field of Post Object type being defined for Pages:

Custom field being populated by editing a Page:

Related product's info being output on the Page:

Note: We will be covering the case where the post object field will have a single value and not multiple values for now.

Step 1

Create your field group having a field of "Post Object" type, select which Post Type items should appear in the dropdown, leave the Return Format as the default (Post Object), set your location rule and save .

Step 2

Edit your entries (Pages in this example) and set associated/related entry of the other post type (a WooCommerce Product in this example).

Step 3

Edit the Oxygen Template that applies to your Pages.

Add a Code Block inside a Section.

PHP & HTML:

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