rwmb_meta shortcode to display first image in image_advanced field?

Support MB Beaver Builder Integration rwmb_meta shortcode to display first image in image_advanced field?Resolved

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #18932
    phillcoxonphillcoxon
    Participant

    Hi!

    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!

    #18937
    Long NguyenLong Nguyen
    Moderator

    Hi,

    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 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.