Custom Fields
Support Meta Box - Beaver Themer Integrator rwmb_meta shortcode to display first image in image_advanced field?

  • Creator
  • #18932
    Resolved phillcoxon


    I have an image_advanced custom field on a CPT with multiple images associated with each post.

    I'm trying to retrieve the url of the first image in the array using the rwmb_meta shortcode to use as a featured image but I'm not sure how to do it.

    For single image fields I see we can use something like this:

    <img src="[rwmb_meta id='product_images' size='full' attribute='url']">

    Is there any way to do the same for the first image in an image_advanced field? Or will I need to create a custom shortcode?

    Thanks in advance!

Viewing 1 replies (of 1 total)
  • Author
  • #18937
    Long Nguyen


    Because the field Image Advanced always returns the array of the image info so we cannot use the shortcode [rwmb_meta] to show the first image. If you want to create your own shortcode, please follow this documentation and follow our guide.

    Let me know if you have any questions.

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.