dynamically change content of div with php

If you were to localize admin-ajax.php then if you add these functions to functions.php: add_action( ‘wp_ajax_nopriv_create_posts’, ‘my_create_posts’ ); add_action( ‘wp_ajax_create_posts’, ‘my_create_posts’ ); function my_create_posts(){ if (is_string($_POST[‘a’])) {   $name = $_POST[‘a’];   //echo $name; and soo on… } } The ‘action’ in the ajax call is needed for defining to which ajax call to pair your function, … Read more