How can I see $post object in frontend from functions.php?

Adding: global $post; print_r ($post); alone, won’t work in functions.php (becuase WP’s core functions etc wouldn’t be loaded). It would inside a relevant template file, but not in functions.php. To make it work in functions.php, you need to do it inside an function that is hooked to an appropriate hook. The “appropriate” hook may depend … Read more

how to add a hidden type input to wp admin login form programmatically

You can hook the login_form action: /** * Fires following the ‘Password’ field in the login form. * * @since 2.1.0 */ do_action( ‘login_form’ ); which is called between the password box and the ‘remember me?’ checkbox, and write out your hidden input field there, e.g. function wpse_366921_hidden_login_field() { ?> <input type=”hidden” name=”hidden-login-field” value=”1″ /> … Read more