How to add Social Media login in WP?

Setting up social media login for a private section of your WordPress website involves several steps. You will need to use a plugin that supports social media logins. One of the popular plugins for this purpose is “Nextend Social Login and Register” or “Super Socializer.”

Here’s a step-by-step guide on how to set it up:

### 1. Install and Activate a Social Media Login Plugin

1. **Login to your WordPress admin dashboard.**
2. Navigate to **Plugins > Add New**.
3. Search for “Nextend Social Login and Register” or “Super Socializer.”
4. Click **Install Now** next to the plugin you choose.
5. After installation, click **Activate**.

### 2. Configure the Plugin

#### Nextend Social Login and Register

1. Once activated, go to **Settings > Nextend Social Login**.
2. You will see a list of supported social media networks (e.g., Facebook, Google, Twitter).
3. Click on the **Provider Settings** for the social network you want to configure.

#### Super Socializer

1. After activation, go to **Super Socializer > Social Login**.
2. Enable the social networks you want to use (e.g., Facebook, Google, Twitter).
3. For each network, you will need to provide the API keys and secrets.

### 3. Set Up Social Media App Credentials

For each social network, you need to create an app and get API credentials. Here’s a brief overview for Facebook and Google:

#### Facebook

1. Go to the [Facebook Developers]( site.
2. Create a new app.
3. In the app dashboard, add **Facebook Login** to your app.
4. Configure the OAuth Redirect URI (usually your site’s URL followed by `/wp-login.php`).
5. Obtain the **App ID** and **App Secret** from the dashboard.
6. Enter these credentials in the plugin settings in WordPress.

#### Google

1. Go to the [Google Cloud Console](
2. Create a new project.
3. Go to the **OAuth consent screen** and configure it.
4. Go to **Credentials** and create **OAuth 2.0 Client IDs**.
5. Configure the authorized redirect URIs (usually your site’s URL followed by `/wp-login.php`).
6. Obtain the **Client ID** and **Client Secret**.
7. Enter these credentials in the plugin settings in WordPress.

### 4. Enable Social Login on Login and Registration Pages

1. In the plugin settings, enable social login on the WordPress login and registration pages.
2. Customize the appearance and positioning of the social login buttons as needed.

### 5. Restrict Access to Private Sections

To restrict access to a private section of your site, you can use a membership plugin like “Restrict Content” or “Members.”

1. Install and activate a membership plugin.
2. Create a new membership level or group.
3. Assign the desired pages or sections to this membership level.
4. Configure the membership plugin to require login via social media or a standard login for accessing these sections.

### 6. Test the Setup

1. Log out of your WordPress admin.
2. Go to the login page and test logging in with the social media accounts you configured.
3. Verify that users can access the private sections only after logging in with their social media accounts.

By following these steps, you can set up social media login for the private sections of your WordPress website, providing a seamless experience for your users.