Remove all video attachment, both files and post/postmeta from database?

You call wp_delete_attachment passing $attachmentid which is undefined, so it can’t work… Also the $force_delete variable isn’t defined anywhere in your code. Also there is no point in using normal loop in here – you don’t use template tags in this action, so calling the_post is just a waste of resources… add_action( ‘set_user_role’, function( $user_id, … Read more

Redirect specific author posts to another url

First of all… [is_author][1] doesn’t check if given user is author of current post. Straight from Codex: This Conditional Tag checks if an Author archive page is being displayed. This is a boolean function, meaning it returns either TRUE or FALSE. So it won’t help you. Another problem with your code is that you perform … Read more

Lost Your password Hook Not Showing Up

you can use wp_lostpassword_url, or you can directly echo it wherever it’s required just by <br /> <a href= “https://wordpress.stackexchange.com/questions/306570/<?php echo wp_lostpassword_url(); ?>” class=”neolog”><?php _e(‘Not a member?’,’text-domain’); ?> <span><?php _e(‘Request an invitation.’,’text-domain’); ?></span></a> You can visit WordPress Codex for more info.