How to fetch post using ajax in wordpress

You can paste the code in your html template file .This is a example code we have tested its working fine .

But there is some variable we have used so you can manage according to your self.

There is no need to use the jQuery library because this code we have tested .its using the wordpress jQuery library.

The given below post you can paste in the function.php file in the wordpress theme so kindly review the code because this is the example code so you can pass the parameter according to your requirement like We have passed the cat=>6 its a cat id so you can pass your cat id .


Share This:

Leave a Reply

Your email address will not be published. Required fields are marked *