WonderfulImageSlider and WordPress REST API

Hi,Bubbler!
Thank you for everything.

I have set the “WonderfulImageSlider” element’s Image list to the post’s eye-catching image retrieved by the WordPress REST API called by the API Connector.
When the image is clicked, I want to pass the id (WordPress) of this slide to the next page with the URL parameter post_id.
This WonderfulImagesSlider’ Clicked Index is no good, of course, because I can only get the index of the slide.
I need help from someone who knows how to get the id (WordPress) of the clicked Image’s data.
The attached image is ideal.
Thanks in advance.

Hey @corp :wave:

Index of the slide is also the index of the data source. So, technically, you can get the corresponding thing by using the index of the slide with something like this: WP PICKUP API - Get FC PICKUP: item # This WonderfulImageSlider V2's Clicked Index : XXXX where XXXX is the whatever ID of the post.

To use this though, you have to enable parentheses because current expression editor has trouble’s getting the item # of a list of things and showing you the fields of that thing.

And also, you can call the API endpoint and store the results in a custom state once the page is loaded so you don’t call it over and over again while doing this call.

I hope this helps.

bdk_512x512 @Huseyin from Flusk | Discover the #1 Security and Monitoring Tool for Bubble

1 Like

Hey @flusk :raised_hand:

Thank you very much!
I was able to implement the following.

・Create a custom state for WonderfulImageSlide element.
・Make the custom state a List with a text type.
・Set each post id in REST API to the custom state of WonderfulImageSlide element at page load.
・Pass the following URL parameter

This WonderfulImageSlider’s custom state’s:item # This WonderfulImageSlider’s Clicked Index
スクリーンショット 2024-05-13 10.41.50


スクリーンショット 2024-05-13 10.41.19

1 Like

This topic was automatically closed after 70 days. New replies are no longer allowed.