Hi there,
I have a page that lists around 60 posts of a custom post type.
Some of those posts have a CRED form included - in this example, there are around 30 forms, each form only has 1 or 2 fields.
When the page loads, it sends off 169 AJAX requests.
This then causes anything I have to have to wait for them to finish. So, when my page loads, I want the user to be able to perform an AJAX action when they need to. At the moment, it takes over 1 minute to finish doing the calls.
What's going on and how can I improve this, please? It's making my site pretty unusable at the moment.
I'm happy for the CRED form to load on a button click, but I can't see how I can do that either.
I've also tried having pagination, so it doesn't load all at once, but that then seems to break any additional JS I have included in my theme. It's not feasible for me to include the JS in the view - my site is very complicated, so I need to keep things in their appropriate places in the theme.
Thanks in advance.
Not to worry! Thanks guys - my fault entirely.
I've re-looked at my conditional logic and I had included some forms where they needn't be, so I was pointlessly loading them. Doh.