Oxygen/WYSIWYG, Images, Video fields output to Array not an image or video
Support › Meta Box AIO › Oxygen/WYSIWYG, Images, Video fields output to Array not an image or videoResolved
- This topic has 8 replies, 2 voices, and was last updated 3 years, 11 months ago by
Long Nguyen.
-
AuthorPosts
-
April 27, 2021 at 2:52 AM #27670
Anthony Pascucci
ParticipantHow can I have the WYSIWYG field output images?
On the backend,
--created CPT "Hobbies"
--Created CF "Hobby Images" used the CF WYSIWYG
--Also created CF "Hobby Pictures" CF Images and "Hobby Video" CF URL
--I've made the above fields cloneable
--I'm trying to add the above fields to a lightbox (Oxyextras) and they are not working--
--All of the above CF (WYSIWYG, Image, Url etc) output on the frontend as "array" not the image & video.--I've tried to check settings, but I don't see any that would help fix this and I don't know how to code so well.
Thank you.
April 27, 2021 at 12:54 PM #27684Long Nguyen
ModeratorHi Anthony,
It outputs an array that means we need to create a loop to iterate through array elements, just like the field
group
. Refer to these topics
https://support.metabox.io/topic/oxygen-builder-output-a-repeater-field/
https://wordpress.org/support/topic/file-advanced-returns-the-emptiness/April 27, 2021 at 7:09 PM #27703Anthony Pascucci
ParticipantHi,
Thank you for your prompt response.I don't know what any of that code stuff means, but I was able to follow the screencast that you did.
Unfortunately, it didn't work, I don't see anything at all...it is completely blank. I created a view and followed all of the steps, but it isn't working.
April 28, 2021 at 9:46 AM #27720Long Nguyen
ModeratorHi Anthony,
Can you please share the code that creates the custom fields (Getting PHP code) and the code in your View?
I can help you to check it.
May 18, 2021 at 1:19 AM #28242Anthony Pascucci
ParticipantHi,
I'm just getting back to doing this now...The images seem to output now, so no problems there.
BUT, I still can't get video links to render on the front end.
I did try using oEmbed and w/shortcode [rwmb_meta id="video_oembed"] and that seemed to work BUT I'm wondering if it's possible to get rid of the URL link above the video
Ideally, I would like to use WYSIWYG to add video links but I still can't get that to render on the frontend.
Thanks!
May 18, 2021 at 1:33 AM #28243Anthony Pascucci
ParticipantI forgot to mention in my last msg that I'm using Oxygen builder
May 18, 2021 at 6:00 AM #28247Long Nguyen
ModeratorHi Anthony,
Please update the new version of Meta Box 5.4 then you can embed a video in the WYSIWYG field and use the shortcode to show it.
May 18, 2021 at 6:48 AM #28248Anthony Pascucci
ParticipantHi,
Thanks for your prompt response. However, my Meta Box plugins are all up to date--I'm using this shortcode [rwmb_meta id="video_oembed"] instead of "video_oembed" I'm using the field name of the field for the wysiwyg (ie. hobby_videos) and it doesn't render.
May 18, 2021 at 1:11 PM #28261Long Nguyen
ModeratorHi Anthony,
The shortcode does not work with the cloneable field. You can create your own shortcode to show the cloneable field value, follow this documentation https://docs.metabox.io/extensions/meta-box-group/#outputing-group-with-page-builders.
For simple field, the embedded video render as well https://share.getcloudapp.com/rRuG2xXY
-
AuthorPosts
- You must be logged in to reply to this topic.