In single-game.php
I use to call a function $post_id = programmatically_create_post_game();
and a footer. It is working (a game is created when clicking on the button) but the footer isn't loaded. I expect the footer to be loaded when the page is displayed (clicking or not on the button).
When I do not call the function, the custom post is loaded (the button isn't working as the function is not called) but the footer is loaded.
In functions.php, the function is :
function programmatically_create_post_game() {
...
}
add_action( 'wp_ajax_programmatically_create_post_game', 'programmatically_create_post_game' );
What is missing ?