Loading Posts & Category with Ajax
Sure, the get_template_part() function can be called multiple times referencing to different files, so if you have a file in the partials/-folder, all you have to do is add a second function call here. function load_cat_posts () { $cat_id = absint($_REQUEST[‘cat’]); $args = array ( ‘cat’ => $cat_id, ‘posts_per_page’ => 10, ‘order’ => ‘DESC’ ); … Read more