hmmm can you explain how your mobile theme work if this is impossible?
where can i find locations for mobile theme? How can i get it progrmmaticly in separate plugin?
This field called td_wp_editor (meta field) and this is the function for exposing it to the REST API.
function expose_td_wp_editor_field() {
register_rest_field(‘page’, ‘td_wp_editor’, array(
‘get_callback’ => ‘get_td_wp_editor_value’,
‘update_callback’ => ‘update_td_wp_editor_value’,
‘schema’ => null,
));
}
function get_td_wp_editor_value($object, $field_name, $request) {
return get_post_meta($object[‘id’], $field_name, true);
}
function update_td_wp_editor_value($value, $object, $field_name) {
if (!empty($value) && is_string($value)) {
return update_post_meta($object->ID, $field_name, wp_kses_post($value));
} else {
return delete_post_meta($object->ID, $field_name);
}
}
add_action(‘rest_api_init’, ‘expose_td_wp_editor_field’);
I really look forward to when you will be replaced by chat bots, they at least answer quickly and to the question asked. Regards!
You must have a pay per post system, every time on this forum you get a waste of time (premium) instead of help. Let’s go in a different way. If there is a field in the admin, it means that it was created there and it can be displayed in the rest api. In order for me to try to display it I need advice (not to waste a lot of time ….) how the developer has realized this field (for example, that it is a meta field with such and such name and that you can try to display it like this, or at least what is this field) so that I could at least look for help and try to do something. Thanks, I hope the answer will be more informative than the previous ones
Hi, i need mobile version so my question is how can i put content to this field https://www.screencast.com/t/xbgZG8kH via rest api? Thank you
Well, removal is the universal way to fix anything. And if I need this functionality? I see that the plugin is in beta version. That’s why I’m writing about the bug because the plugin has been in beta for over a year. Maybe there is some other way to generate critical css which you can share?
No custom development is required, I just asked how I can go back to the default api answer and remove what the newspaper template brings (login form).
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!
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
thanks for the quick answer, but the question was slightly different) I asked how to do it programmatically from the code (php)
If you are using cloudflare turn off rocket launcher
try it on home page
Thanks for the answer, Calin. At this stage, I tried to get at least recognition of the problem. There are a lot of assurances in the topic of selling, about the best SEO practices, and about speed (I will not sprinkle screenshots, you already know), but at the moment this is far from reality.
At the very least, I wanted to hear that you know about the problem. And that in the next release we will do this and that, for example.
I can provide your developers with the script that cuts out all unnecessary css on the basis of the сoverage, but I need much more time to correctly connect a clean css file, because of javascrit with which I am not very friendly.
I’m just trying to convey that this is very important now and this is a problem. I understand that the support does not cover this, but I do not understand the formal replies that we are doing well with this. Few of those who bought your template make a website for their mother on it. It is necessary to promote the site and display ads on it, which, by the way, will even more affect the site speed indicators, so I (and I think other buyers) would like to understand that updates are taking into account the situation and priorities of the clients, and not the personal goals of the developers (nothing personally).
In the end, it is the clients pay for the entire work of the support team and developers.
You can of course deceive them, or you can listen to them and gets better every day, here is your decision which is more profitable for you.
Screen about focusing on optimization… instead of 1000 words

-
This reply was modified 5 years by
usc-shift.
Thank you friend, but Vlad are not writing to us, but to those who do not really understand the technical details and will not check what we are writing here and trying to prove, but simply read that the update is focused. Pure marketing, nothing personal, but for us it can be translated as go anв …. yourself.(( It is calculated that 99% of people will simply decide not to waste their time and not write the same thing 300 times.
-
This reply was modified 5 years by
usc-shift.
Everything listed by you, Vlad, is not related to the topic of discussion! I’m trying to tell you that any pro demo still has a bunch of extra code connected to the header
and loading the first screen is far from ideal, we are not talking about content! I get the feeling that the main task is not admit the problem and fix it. Just write that we don’t care about Google’s December update and we do not recognize the problem as these improvements are not included in our plans. I do not want to give the address of my site because the problem is the same in all demos as well as on my site.
Okey but 1 screen is a PRO!)))
Vlad, I’m not talking about content! The topic is that the connected styles contain a lot of unnecessary code, especially with the standard pack. I attach a screen 
and standart demo

Next, go to the lighthouse and see what’s in the main problems (don’t look at the content), and you will understand what is meant
If you follow the SEO news and Google announcements, then of course you understand that these are problems that it is very desirable to solve and this will be an excellent advertisement for your template and a reason to recommend it. In addition, these tools are cov and light and were implemented directly into the browser for a more accurate assessment of problems than in Google Page Speed and before Google rolled out an update about the user experience on the page. Therefore, it makes a lot of sense to be guided by these tools. For you, as developers, this is not such a difficult task and it is much more efficient to solve it in a centralized way than everyone will solve it independently. Thanks in advance.
-
This reply was modified 5 years by
usc-shift.
You can look on any demo provided by tagdiv, the same situation with pro ‘optimised’ demos. Look at the coverage in chrome devtools, and lighthouse scores
I wrote a script that accepts the coverage.json at the input, and generates a file with the only used styles, but js does not work (menu, pictures), as we can see, the authors of the theme will not help us and will answer in style: this is a very individual problem that requires bla bla bla give us money, or give link to the google…
This answer should be pinned at the top of the sale page on themeforest.
When Google increasingly talks about page load speed as a ranking factor and introduces special tools right in the browser, such as coverage and lighthouse, this kind of answer means: you already gave us money and you are not interesting to us, we wanted to spit on you. Goodbye loser!
-
This reply was modified 5 years by
usc-shift.