Hello!
Great, and my question is how to get the content of these pages using php commands, or even better through rest api, perhaps there are code examples somewhere on how to get or change these templates using php
Thank you
ok, I figured it out and added the option to show_in_rest = true, but now the problem is that before json response, the html login form is displayed, how can I change this behavior
my code
add_action( 'init', 'my_custom_post_type_rest_support', 25 );
function my_custom_post_type_rest_support() {
global $wp_post_types;
//be sure to set this to the name of your post type!
$post_type_name = 'tdb_templates';
if( isset( $wp_post_types[ $post_type_name ] ) ) {
$wp_post_types[$post_type_name]->rest_controller_class = 'WP_REST_Posts_Controller';
$wp_post_types[$post_type_name]->show_in_rest = true;
// Optionally customize the rest_base or controller class
$wp_post_types[$post_type_name]->rest_base = $post_type_name;
}
}
an answer
<!-- LOGIN MODAL -->
<div id="login-form" class="white-popup-block mfp-hide mfp-with-anim td-login-modal-wrap">
<div class="td-login-wrap">
<a href="#"><i class="td-icon-modal-back"></i></a>
<div id="td-login-div" class="td-login-form-div td-display-block">
<div class="td-login-panel-title">Anmelden</div>
<div class="td-login-panel-descr">Herzlich willkommen! Melden Sie sich an</div>
<div class="td_display_err"></div>
<form id="loginForm" action="#" method="post">......
and after login form the normal json answer is displayed
even if I send the request while logged in with jwt token
how can i get rid of the login form in the response
Thank you
-
This reply was modified 3 years by
usc-shift.
Hello!
This will require custom work which is not covered by the support team.
For customization and other services you can contact our custom work team here: https://tagdiv.com/premium-customization-services/
Thank you so much for understanding!