duplicate posts with ajax load more wordpress

Firstly your cat parameter expects an array and you’re passing a json string to it… You need to json_decode back your array of posts to run through the query. Secondly, you are using query_posts() which if you look at the codex page reads: Note: This function will completely override the main query and isn’t intended … Read more

How to let a user create a post by submitting a POST form?

The echo part should be at the end of your code. Keep that in mind, any echo or print should be at the end of your piece of code. <?php if( $_POST[‘title_given’] ) { // Create post object $my_post = array( ‘post_title’ => wp_strip_all_tags( $_POST[‘title_given’] ), ‘post_content’ => ‘Did it work??’, ‘post_status’ => ‘publish’, ‘post_author’ … Read more