Dynamically load posts based on category

No there is no such premade code to load posts based on which categories are selected without reload the page content. There are two option you can imply. Option 1: Using Ajax Option 2: Loading all the content and hide/show using CSS & jQuery tricks Note: Option 2 increase your initial load time as you … Read more

Use Shortcode on Custom Page

You should this way to handle ajax request. It’s the recommended way to make a ajax call in WordPress. my_function.js Update your jquery with this code. jQuery(document).ready(function($) { $(‘#submit_payment’).click(function(e){ e.preventDefault(); var str = $(“form[name=season-form]”).serialize(); //alert(str); $.ajax({ type: “POST”, url: ‘//www.example.com/wp-admin/admin-ajax.php’, data: str + ‘&action=confirmRequest’ }).done(function(data){ $(“#result”).html(data); }); }); }); ajax_request_handling Paste this in functions.php of … Read more