Generate dynamic page through data from another page

You need javascript code that make ajax request (after click on item from list) and display data from response. You will need also function that receive object ID from request and prepare response. Add function to action hook wp_ajax_nopriv_my_action add_action( ‘wp_ajax_nopriv_my_action’, ‘my_action’ ); function my_action() { $output=””; if ( isset($_POST[‘object_id’] ) { // prepare output … Read more

Recommended way to remove WP REST API returned data for custom post

While the docs state: Note that the API cannot prevent you from changing responses, but the code is structured to strongly discourage this. Internally, field registration is powered by filters, and these can be used if you absolutely have no other choice. there IS another choice for most cases, namely: custom endpoints/routes. You can even … Read more