How to Add an Iframe to Login to a Separate Website to WordPress
Welcome to my blog post on how to add an iframe to login to a separate website to wordpress. In this example, I will show you how to add an iframe to the login page of a free wordpress account so that users can easily log in to the MetaphysicalMuse.com website using their wordpress account. The benefits of adding an iframe to your login page are that:
- It’s easy;
- Your users can already log in to your site using their wordpress account;
- It provides a seamless integration with your other social media accounts (if you use these); and
- It gives you a chance to collect email addresses (which you can then use to send them a newsletter).
So let’s get started.
1. Log in to your wordpress account and click the admin menu
To get started, log in to your wordpress account and click the admin menu button in the top right corner of the page, as shown in the example below.
This will take you to the dashboard for your wordpress site. From here you can access all the settings for your site. To add the iframe login button, simply click on the button in the top right corner and a dropdown will appear with the Add New option selected. You can then navigate to the Iframe Login page template and save it on your site as login.html.
2. Import the login.html file into your WordPress dashboard
Next, you will want to go into the WordPress dashboard for your site and click the import button in the upper right corner to bring up a dialog box. The WordPress dashboard is where all the magic happens so make sure you spend some time here getting familiar with how everything works. Once you have the dashboard open, click the button in the upper right corner to display the files available for upload.
You will see a file called login.html appear here. Click on this file to upload it to your WordPress site. You can then click the icon next to the file to bring up the details for this file.
Note: If you are getting an error saying that the file is too big, it’s probably because your WordPress installation is set to allow larger uploads than you are currently using. You can either change the setting to smaller files or use a service like Cloudinary that can help you upload large files without any issues.
3. Add the login button to the page header
Now that you have the login.html file on your WordPress site you can continue to add the login button to the page header area of your site.
Go to your WordPress dashboard and click on the page header for the page that you want to edit. Then, click on the gear icon next to the word “Appearance” as shown below to bring up the WP dashboard settings.
From here you can set various options for your site’s header including the social media accounts to display (if you use these). To add the login button, scroll down to the bottom of the settings and you will see a section called “Submit Options.” Here you can enter the HTML for the login button you want to use.
In this case, we will enter the following code:
<a href=”https://wordpress.com/login/”><strong>Login with WordPress.com</strong><strong>
<a href=”https://wordpress.org/login/”><strong>Login with WordPress.org</strong><strong>
4. Customize the login form
You can also go into the login form and change the look of the authentication box. To do this, go back to your WordPress dashboard and click on the gear icon next to “Forms.” This will open up additional options for your login form. You can then click on the dropdown next to “Forms” to select the form you want to edit (in this case the “Password” form).
Go into the form and start by changing the fields’ labels. For example, instead of displaying “Email” as the field label, you can enter something like “Email or username” to make it more clear what this field is for. You can also change the visual appearance of the label by clicking on the “eye” icon next to it to make it appear as a simple circle with a white dot in the middle, as shown below.
To change the look of the password field, go into the form and you will see that there is a small square box next to the password field. You can then enter the text you would like to use for this field and select the colors for the background and text using the options presented in the color picker next to the box. You can also make this field longer by entering more text in it and if you want to have a custom image next to the field, you can do that by clicking on the “Image” option in the top right corner.
Once you have added the iframe login button to the login page you can log in to your site as usual via the login button or you can go to your WordPress dashboard and click the “logged in as” button to view your site contents.
Hopefully, this article has helped you understand how to add an iframe to login to a separate website to your WordPress site. You can use this knowledge to create wonderful integrations between your different platforms (especially important if you use multiple social media accounts).