I am using a Wordpress Plugin called 'All-in-one Event Calendar'. The plugin has a option to copy and paste a piece of script and put it in your code. This code will then generate events on the page. The plugin will create one event item for each event post.
My Question:
Is there a way to limit this to X amount of posts (in my case 3)? The developers of the plugin aren't able to answer the Wordpress forums and any solutions on the Wordpress forums are from 4 years ago and most of those solutions (for some reason) has been removed by the developers.
Here is the Code that generates the Widget:
<script class="ai1ec-widget-placeholder" data-widget="ai1ec_agenda_widget" data-events_seek_type="events" data-show_subscribe_buttons="false">
(function(){var d=document,s=d.createElement('script'),
i='ai1ec-script';if(d.getElementById(i))return;s.async=1;
s.id=i;s.src='//YOURSITEURL/?ai1ec_js_widget';
d.getElementsByTagName('head')[0].appendChild(s);})();
</script>
I have tried using some jQuery and Delete all posts after 3 but the posts takes a while to actually load (The load times vary) so I can't target the elements that the plugin creates.
AJAX COMPLETE
$(document).ajaxComplete(function(){
SCRIPT PROVIDED
});