Thanks to Christian Cox i was able to install in a post flexslider , but now i have another problem on the search , when im sorting the post , image disapear 🙁
Hi,
Thank you for waiting.
During troubleshooting, I noticed that the code to initialize the "flexslider" script executes only when the page reloads, but not when the results are updated using AJAX (i.e. without the page reload).
Also, the same script is being included twice in the view, which is not needed.
1. "JS editor" tab in the "Search and Pagination" section
2. "JS editor" tab in the "Loop Editor" section
// Can also be used with $(document).ready()
$(window).load(function() {
$('.flexslider').flexslider({
animation: "slide"
});
});
To make this work with page reload and also with AJAX load, please follow these steps:
1. Please remove the existing script mentioned above from both places and only include the following, in the "JS editor" tab in the "Search and Pagination" section:
// function to process flexslider
function processFlexslider()
{
$('.flexslider').flexslider({
animation: "slide"
});
}
// load processFlexslider function on page load
$(window).load(function() {
processFlexslider();
});
2. Add processFlexslider in the "will run after updating the results" field, under the "Custom Search Settings" section, as shown in the screenshot:
hidden link
I hope this helps and please let me know how it goes.
regards,
Waqar
still not working sir , can you check it
The new code that I suggested in step 1, was missing from the view.
I've added it ( screenshot: hidden link ) and it is now working.
Note: The old code is still included in "Loop Item - Grid" content template's "JS Editor" tab:
hidden link
Please remove it, as it is no longer needed.
regards,
Waqar
My issue is resolved now. Thank you Mister!