I wanted to add html "required" to the product name when add new product but not sure how to edit the page. Can anyone show or point out where the php file is located at?
CodePudding user response:
Code is located in this file https://github.com/WordPress/WordPress/blob/master/wp-admin/edit-form-advanced.php#L522
However, you must not modify WordPress core files.
and Please check this gist https://gist.github.com/elvismdev/60cb39da63dd97d87b8f2e64ddb1ba29 that will help your make your title required and prompt warning when you'll publish the post
CodePudding user response:
your desired php file must exist at below address:
/<your site address>/wp-content/themes/<theme name>/Template/<file name>.php
In my case, my contact-us page is at:
/var/www/html/<mydomain.com>/<my site name>/wp-content/themes/twentyseventeen/Template/contact-us.php
hope this will help someone. Thanks