Here is the scenario :
- There are several products in a category (Products means posts in a
particular category) - Each product (post) have several images (I managed it by adding
custom fields) - In the front end, Products will display all together
- On that page there will be a image slider in the footer
- Clicking on each product name, will change the slider images
accordingly to the clicked product
So all i need is to get the custom field values corresponding to the clicked product. Is it possible to do this using AJAX request.? So that i can manage all this process without a post back.
Thanks.
I haven’t experience in wordpress but I can show you the example of of AJAX.
As far as I know that you have to do call ajax function on the click of related post or product like this.
Hope this will help and feel free to ask anything for AJAx request.
It is quite easy. Ofocourse thanks to Rajat Modi for the help in ajax. Here you go :
Add this to the functions.php in your template file :
Create and add the following code to “/js/script.js” :
I hope it is clear now. Thanks again for the reply my friend. Have a great day. 🙂