How To Display Wordpress Query Using Ajax
Trying to display content using jQuery is giving me some trouble. I’ve created three buttons, when clicked they load data from a php file on my server. Everything works except
Solution 1:
It sounds like your script slide-fade-content.php is not instantiating WordPress so you are not able to call the WordPress function get_posts()
and you get the error call to undefined function.
If you include your WordPress config file you will be able to make calls on the WordPress API.
require_once [path to WordPress install].'/wp-config.php';
Post a Comment for "How To Display Wordpress Query Using Ajax"