Affichage des articles dont le libellé est Remove. Afficher tous les articles
Affichage des articles dont le libellé est Remove. Afficher tous les articles

samedi 12 novembre 2016

How to Remove the Password Reset / Change option from WordPress



Are you looking to remove the password reset option in WordPress? By default, WordPress allows users to reset/change password by providing their email address. Sometimes you may want to disable password reset option in WordPress. In this article, we will show you how to remove the password reset / change option from WordPress.


Removing password reset option from WordPress


Why Remove Password Reset/Change Option From WordPress


If you allow user registration on your WordPress site, then password reset option allows user to recover lost passwords. Normally, you wouldn’t want to change that.


However, in some usage scenarios you may want to remove this option for specific users or user roles on your WordPress site.


For example, if you have created a temporary account for someone or if you have created a demo site where users can login with a demo username and password.


The easier solution will be to just remove the password reset link. But some savvy users may already know the URL to access the password reset form.


Having said that, let’s see how you can easily remove password reset/change option from WordPress.


Method 1: Disable Password Reset/Change Option Using Plugin


The plugin method is better and easier. It allows you to disable password reset option for specific user roles or even individual users.


This way you can still control and provide password reset feature for some trusted users or user roles.


First thing you need to do is install and activate the Plainview Protect Passwords plugin. For more details, see our step by step guide on how to install a WordPress plugin.


Upon activation, you need to visit Settings » Protect Passwords page to configure the plugin settings.


Protect password settings


Simply select the user roles or individual users to disable their password change or reset option.


There is also an option to exempt individual users. This option is useful if you want to disable password reset option for all users except yourself.


Don’t forget to click on the save changes button to store your settings.


You can see the plugin in action by visiting the WordPress login page and clicking on ‘Lost your password?’ link. It will take you to the password reset page where you can try entering the username or email address for a user who does not have password reset option.


You will see an error indicating that password reset is not allowed for this user.


Password reset disabled for this user


Method 2: Manually Disable Password Reset Option From WordPress


This method requires you to add code to your WordPress site. It is not recommended for beginner level users.


First thing you need to do is open a blank text file using a text editor like Notepad. Paste the following code inside this file.



<?php
/*
* Plugin Name: Disable Password Reset
* Description: Disable password reset functionality. Only users with administrator role will be able to change passwords from inside admin area.
* Version: 1.0
* Author: WPBeginner
* Author URI: http://wpbeginner.com
*/

class Password_Reset_Removed
{

function __construct()
{
add_filter( 'show_password_fields', array( $this, 'disable' ) );
add_filter( 'allow_password_reset', array( $this, 'disable' ) );
add_filter( 'gettext', array( $this, 'remove' ) );
}

function disable()
{
if ( is_admin() ) {
$userdata = wp_get_current_user();
$user = new WP_User($userdata->ID);
if ( !empty( $user->roles ) && is_array( $user->roles ) && $user->roles[0] == 'administrator' )
return true;
}
return false;
}

function remove($text)
{
return str_replace( array('Lost your password?', 'Lost your password'), '', trim($text, '?') );
}
}

$pass_reset_removed = new Password_Reset_Removed();
?>

Save this file as disable-password-reset.php on your desktop.


Now you need to upload this file to your WordPress site. You will need an FTP client to do that. See our guide on how to use FTP to upload WordPress files.


Connect to your website using the FTP client and then go to the plugins folder. The plugin’s folder is located inside /wp-content/ directory.


Plugins folder on a WordPress site


Upload disable-password-reset.php file from your computer to the plugins folder on your WordPress site.


Now you need to login to your WordPress admin area and visit the plugins page. You will notice a new plugin titled ‘Disable Password Reset’ in your list of installed plugins. Click on the activate link below the plugin.


Activate Disable Password Reset plugin


That’s all, activating the plugin will disable password reset option for all users including administrators. Administrators will be able to change passwords from the admin area, but they will not be able to reset password from the login screen.


We hope this article helped you learn how to remove the password reset/change option from WordPress. You may also want to see our list of 13 plugins and tips to improve WordPress admin area.


If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.


The post How to Remove the Password Reset / Change option from WordPress appeared first on WPBeginner.







How to Remove the Welcome Panel in WordPress Dashboard



Do you want to remove the welcome panel in your WordPress dashboard? The welcome panel is a box added to the dashboard page of your WordPress admin area. It contains shortcuts to perform different tasks and helps new users find their way around. In this article, we will show you how to remove the welcome panel in WordPress dashboard.


Remove welcome panel in WordPress dashboard


Why Remove Welcome Panel in WordPress?


Welcome panel is a meta box added to the dashboard screen of WordPress admin area. It shows shortcuts to different sections of your WordPress site.


Welcome Panel


The purpose of the welcome panel is to help beginners find their way around WordPress.


However as you become more familiar to all these locations, this panel will become less useful for you.


Having it on the screen, pushes down other important dashboard widgets and make them less noticeable.


Let’s see how you can easily get rid of the welcome panel from your WordPress dashboard screen.


Removing Welcome Panel from WordPress Dashboard


There are multiple ways to hide and even completely remove the welcome panel.


The easiest way to remove it is by simply clicking on the Dismiss button at the top right corner of the panel.


Dismiss welcome panel in WordPress dashboard


You can also remove the welcome panel by clicking on the Screen Options button at the top right corner of the screen.


This will bring a fly down menu. You need to uncheck the checkbox next to ‘Welcome’ option.


Remove welcome panel using Screen Options in WordPress


Both methods mentioned above will hide the welcome panel. You can access it again by clicking on the Screen Options button and checking the box next to Welcome option.


However if you want to completely remove the welcome panel even from the Screen Options, then that’s also possible.


This method requires you to add code to your WordPress site. If you haven’t done this before, then take a look at our guide on pasting snippets from the web into WordPress.


You will need to add this code to your theme’s functions.php file or a site-specific plugin.


remove_action('welcome_panel', 'wp_welcome_panel');

This code simply removes the action that adds the welcome panel to the admin dashboard.


You can now visit the dashboard screen and click on the Screen Options menu. You will notice that the welcome panel option will no longer be available.


Welcome panel removed from dashboard and Screen Options menu


That’s all. We hope this article helped you remove the welcome panel in WordPress dashboard. You may also want to see our list of 19 actionable tips to drive traffic to your new WordPress site.


If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.


The post How to Remove the Welcome Panel in WordPress Dashboard appeared first on WPBeginner.







How to Remove the Powered by WordPress Footer Links



Do you want to remove the powered by WordPress footer links on your site? Recently one of our readers asked if it was possible to remove footer credits in WordPress themes. In this article, we will show you how to remove the powered by WordPress footer links in your themes.


Remove Powered by WordPress Links


The default WordPress themes use the footer area to display the “Proudly powered by WordPress” link. Many theme developers take this further and add their own credits, so it looks something like “Powered by WordPress. Theme by Company Z”.


But if you’re running a business website, then it doesn’t make any sense to display these credits. Some even think that it makes your website look unprofessional.


Is it legal to remove WordPress footer credit links?


We get this question a lot. Yes, it is absolutely legal to remove footer credits link on your WordPress site.


WordPress is free, and it is released under the GPL license.


In short, that license gives you the freedom to use, modify, and even redistribute WordPress. Any WordPress theme or plugin that you download from the official WordPress.org directory, and even most commercial WordPress themes are also released under the same license.


So you have full rights to do what you please with your website including removing the footer credit links.


Let’s take a look at how to customize your WordPress footer and remove these credit links.


Video Tutorial



If you don’t like the video or need more instructions, then continue reading.


Removing WordPress Powered by Links


There are many ways to remove the WordPress footer credit links, but we only recommend the following 2 ways of doing this.


The Theme Settings Page


Most good theme authors know that their users want to have the option to remove footer credit links. That’s why they make it available in their theme settings area.


Different themes have this setting available under different sections. But the first place to start looking is inside the WordPress theme customizer (Appearance » Customize).


For example, the GetNoticed theme by Michael Hyatt give users the option to customize the footer text as well as disable the credit links.


GetNoticed Footer Credits Setting


Other places that you can look are individual theme’s options pages or inside the Widgets section.


Footer.php Code Method


If your theme does not have the option to remove or modify footer credits from WordPress admin, then your only option is to edit the footer.php code.


You can find this file in your /wp-content/themes/yourtheme/footer.php


Simply open this file in a text editor and search for the footer credit text like “Powered by”, and it will show you the section that you need to remove.


In the default Twenty Sixteen theme for WordPress, the code looks like this:



<div class="site-info">
<?php
/**
* Fires before the twentysixteen footer text for footer customization.
*
* @since Twenty Sixteen 1.0
*/
do_action( 'twentysixteen_credits' );
?>
<span class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></span>
<a href="<?php echo esc_url( __( 'https://wordpress.org/', 'twentysixteen' ) ); ?>"><?php printf( __( 'Proudly powered by %s', 'twentysixteen' ), 'WordPress' ); ?></a>
</div><!-- .site-info -->

You can either remove this text entirely or customize it to suit your needs.


Avoid the CSS Method at All Cost


Now some WordPress tutorial sites may show you a CSS method that uses display: none to hide the footer credit links.


However doing so will put your site’s SEO at risk. Google does not like hiding links with display:none because that’s a technique that spammers use to hide the links from users while still showing it to Google (in hopes of higher rankings).


Your site might get flagged, and it will cause you to lose your search engine rankings.


So whatever you do, do not use the CSS method like this:


#site-info {display:none}

While it looks simple, it’s not good for SEO.


We strongly recommend using the two methods that we showed above. If you cannot do either of those, then we recommend hiring a professional to help you remove your footer credit links or even consider changing your WordPress theme.


We hope this article helped you remove the powered by WordPress footer links. You may also want to check out our guide on how to improve your WordPress security.


If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.


The post How to Remove the Powered by WordPress Footer Links appeared first on WPBeginner.