I have a simple view (“resources/views/partials/post-preview.blade.php”) containing markup for my posts.
When displaying the page initially everything is working fine: in my page I just loop the list of posts (returned by the controller) and include the post-preview to display all of them individually. However once the page is loaded and I submit ajax queries to my custom WordPress hook (wp_ajax_load_posts) I don’t know how to access the “post-preview” view to return formatted HTML.
I couldn’t find much documentation on how to approach AJAX stuff with Sage 9 so a little help would be greatly appreciated. Thanks!