Get Image Sub Field from Meta Box Group Field in Oxygen

As of Oxygen 4.3 it is not possible to set an Image component’s ID or URL to that of a Single Image-type sub field that’s inside a cloneable group field when using Meta Box and Oxygen Repeater component.

This members-only tutorial shows how we can define custom functions that can be used with the dynamic data feature of Oxygen to return the ID or URL as needed.

Step 1

Add the following in your favorite code snippets plugin:

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.


Posted

in

, ,

by

Comments

4 responses to “Get Image Sub Field from Meta Box Group Field in Oxygen”

  1. arsh999cg Avatar
    arsh999cg

    Please update the above code as it is not working anymore. I’ve debugged it usign var_dump and it is working with this

    “`

    “`

    I’ve to add [0] index after the [$field_id].

  2. arsh999cg Avatar
    arsh999cg

    Somehome comment is mismatched above here is the working code.

  3. arsh999cg Avatar
    arsh999cg

    My PHP code gets removed from comments, maybe WordPress cleaning it up. The first comment has a solution, it is for “wpdd_get_image_sub_field_url” function

    1. Sridhar Katakam Avatar

      Just tested and the tutorial is working fine.

      For code that you want to place in the comments, it is better to first upload to GitHub Gist or pastebin.com and then provide its link.

      For further help on this, please contact via https://wpdevdesign.com/account/?action=support with WP admin login to the site in question.

Leave a Reply

Your email address will not be published. Required fields are marked *