I am attempting to integrate ajax the very first time during my wordpress theme I'm doing. This really is my first attempt and that i investigated around the syntax and just how it really works. To date, my script is performed correctly there is however no response.

The $.get Request

 $.get('Ajax-nao.php',{cat:12,ponum:5,panum:1},function(data) {
 alert('data sent'+ data);

The Ajax-nao.php

 $categoryid = $_GET['cat'];
 $postnum = $_GET['ponum'];
 $pagenum = $_GET['panum'];

 $args = array (
        'cat' => $categoryid,
        'posts_per_page' => $postnum,
        'paged' => $pagenum
$q = new WP_Query($args);
while( $q->have_posts()) : $q->the_post();
    $post_excerpt = get_the_excerpt();
    $wrapper = '<h2 class="column-titles">' . get_the_title() . '</h2>' . '<p>' . $post_excerpt . '</p>';
    echo $wrapper;

home.php <-- In which the results is going to be displayed.

    <div id="social-bar">
    <div id="other-posts" class="just-float-left">

    <div id="other-Posts-container">


Can anybody assist me to pin-point my error?

WP_Query($args) returns empty set.

In the finish of the PHP script change it out from:

            echo $wrapper;


    echo $wrapper;
echo "No results found!";

you will get assurance if there's data found.