I have made a WordPress plugin that handles ajax post. Whenever i post using ajax to the same page or plugin i need only certain amount of data being returned and not all the header and footer that default page template has. Whenever i get response from the server after ajax post i need to append the data to some div. So how do i use different page templates at runtime; one when the plugin page is loaded and another after the response/data from the server is recieved?
Page template structure
<?php
/**
Template Name: Page
*/
//get header
//get content
//get footer ?>
Blank page template structure
<?php
/**
Template Name: blank page
*/
//get content
?>
Now during ajax response from server i want to use blank page template. How do i do that? Thanks in advance.
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire