Posts

Showing posts with the label page-template

Custom password reset functionality with form for wordpress

For add a custom password reset functionality in your wordpress site or blog just copy and paste below code into new template "password reset" or whatever you want to name it. and put into your theme's folder.. <?php /* Template Name: Password Reset Template */ global $wpdb, $user_ID; function tg_validate_url() {     global $post;     $page_url = esc_url(get_permalink( $post->ID ));     $urlget = strpos($page_url, "?");     if ($urlget === false) {         $concate = "?";     } else {         $concate = "&";     }     return $page_url.$concate; } if (!$user_ID) { //block logged in users     if(isset($_POST['action']) && $_POST['action']=='save_pw_reset')     {         if ( !wp_verify_nonce( $_POST['save_pwd_nonce'], "save_reset_password"))...

How to remove all actions for wp_head or wp_footer for specific template page or as you want

For remove all css and scripts file just copy and paste below code into your functions.php and change according to your need function rj_unhook_wp_head_footer(){     global $wp_filter,$wpdb,$wp_query;     if(is_page('advanced-workshop')) // here i checking for particular page by slug     { foreach ( $wp_filter['wp_head'] as $priority => $wp_head_hooks ) { if( is_array( $wp_head_hooks ) ){ foreach ( $wp_head_hooks as $wp_head_hook ) {                                   remove_action( 'wp_head', $wp_head_hook['function'], $priority ); } } } foreach ($wp_filter['wp_footer'] as $priority => $wp_footer_hooks ) { if( is_array( $wp_footer_hooks ) ){ foreach ( $wp_footer_hooks as $wp_footer_hook ) { remove_action( 'wp_footer', $wp_footer_hook['function'], $priority ); } } }     }   } add_action( 'wp', 'rj_unh...