I know that this issue has been discussed many times, but I think I tried most of the advises.
This is my code:
$.post('<?php echo admin_url( 'admin-ajax.php' ) ?>',
{'action': 'load_posts',
'offset': offset,
'author' : <?php echo $uid?>,
'cat' : '<?php echo $category->name?>',
'color': '<?php echo get_cat_color($category->cat_ID)?>'
}, function(response){
if (response.trim() == ""){$("#more_posts_<?php echo $catNoSpace?>").hide();}
$("#cat<?php echo $catNoSpace?>").append("<div class='newdiv'>" + response + "</div>");
}
And I have these both lines:
add_action('wp_ajax_load_posts', 'ng_load_posts');
add_action('wp_ajax_nopriv_load_posts', 'ng_load_posts');
And a well working ng_load_posts()
function.
Also I tried to disable all of my installed plugins.
What am I missing?
WP_DEBUG
enabled?