How can I apply the remove_post_type_support('email_template', 'title');
only for post edit screen?
The title should be available on create and not for edit.
How can I apply the remove_post_type_support('email_template', 'title');
only for post edit screen?
The title should be available on create and not for edit.
You need to make small function in your
function.php
file:I hope, It'll be help.
In WordPress, there is one global variable to check on which screen we are and it is
global $current_screen
but problem is it can not be used withadmin_init
action.So alternatively we can use load-(page) action to achieve it.
You can try it and give it a go.
Let me know if you have any doubt.
Edited
Explanation : If you can notice on the URL bar of the browser, then you can see when you are adding new post then it is calling post-new.php and when you are editing at that time it is calling post.php with parameters.
So we can utilize it to achieve your desired result.