Image Select not showing from a Dynamic selection
Support › MB Elementor Integrator › Image Select not showing from a Dynamic selectionResolved
- This topic has 7 replies, 2 voices, and was last updated 3 years, 11 months ago by
[email protected].
-
AuthorPosts
-
May 2, 2021 at 10:30 PM #27831
[email protected]
ParticipantHello, as far as the initial selection it's working. I have an option of 2 images and the database is showing which image I have selected correctly.
I have created a loop for Property Archives on a real-estate site.
The dynamic selection is showing and I can pick that field but the image does not show.
(If I simply select an image from the library it will show)Here is the code for the image select
[ 'name' => __( 'Sales Person', 'your-text-domain' ), 'id' => $prefix . 'sales_person', 'type' => 'image_select', 'options' => [ 'image01' => __( 'http://mysite.ca/realestate400/wp-content/uploads/2021/04/female-1.png', 'your-text-domain' ), 'image02' => __( 'http://mysite.ca/realestate400/wp-content/uploads/2021/04/female02.png', 'your-text-domain' ), ], 'save_field' => 1, ]
Thank you
May 3, 2021 at 10:23 PM #27848Long Nguyen
ModeratorHi,
The image URLs are not accessible
http://mysite.ca/realestate400/wp-content/uploads/2021/04/female-1.png
http://mysite.ca/realestate400/wp-content/uploads/2021/04/female02.png
Can you please change it to your site URL http://zentyx.ca/?
http://zentyx.ca/realestate400/wp-content/uploads/2021/04/female-1.png
http://zentyx.ca/realestate400/wp-content/uploads/2021/04/female02.png
May 3, 2021 at 10:44 PM #27851[email protected]
Participant[ 'name' => __( 'Sales Person', 'your-text-domain' ), 'id' => $prefix . 'sales_person', 'type' => 'image_select', 'options' => [ 'image01' => __( 'http://zentyx.ca/realestate400/wp-content/uploads/2021/04/female-1.png', 'your-text-domain' ), 'image02' => __( 'http://zentyx.ca/realestate400/wp-content/uploads/2021/04/female02.png', 'your-text-domain' ), ], 'save_field' => 1, ]
May 3, 2021 at 10:49 PM #27853[email protected]
ParticipantI changed my url to Mysite.ca in the code block here. It's correct on the site
May 4, 2021 at 9:17 AM #27873Long Nguyen
ModeratorHi,
Can you please share some screenshots of the issue? You can also follow the Debugging Information step to troubleshoot the issue https://support.metabox.io/topic/how-to-create-a-new-topic/.
Let me know how it goes.
May 5, 2021 at 5:00 AM #27915[email protected]
ParticipantHello Long, thanks for that info. I think this error info may help...
Warning: Invalid argument supplied for foreach() in /home/zentyx/public_html/realestate400/wp-content/plugins/meta-box-aio/vendor/meta-box/mb-elementor-integrator/src/Traits/Fields/Image.php on line 31
Here is the set up with a simple image grab directly from the library
And here is the set up with the metabox image select
Thank you so much for your time
May 5, 2021 at 12:37 PM #27923Long Nguyen
ModeratorHi,
Thanks for your additional information.
If you are using the Elementor page builder, please use another image field such as single_image. The field type
image_select
saves the valueimage01
orimage02
in the database instead of image ID, so the Elementor cannot render the image based on that value.Get more details on the documentation https://docs.metabox.io/fields/image-select/#data
May 5, 2021 at 5:20 PM #27940[email protected]
ParticipantOkay, I'll set it up another way.
Thanks for your time
-
AuthorPosts
- You must be logged in to reply to this topic.