Remove Log In Link
-
I was talking to my website hosting company this morning and they were saying that there is a large risk having a link to log in on the bottom of every page of the website. Can someone help me get rid of it?
-
you can do that by creating child theme of swell lite theme and then copy footer.php file from parent theme to child theme folder and paste this code below
<?php /** * The footer for our theme. * This template is used to generate the footer for the theme. * * @package Swell Lite * @since Swell Lite 1.0 * */ ?> <!-- END .container --> </div> <!-- BEGIN .footer --> <div class="footer"> <?php if ( is_active_sidebar('footer') ) { ?> <!-- BEGIN .row --> <div class="row"> <!-- BEGIN .content --> <div class="content"> <!-- BEGIN .footer-widgets --> <div class="footer-widgets"> <?php dynamic_sidebar( 'footer' ); ?> <!-- END .footer-widgets --> </div> <!-- END .content --> </div> <!-- END .row --> </div> <?php } ?> <!-- BEGIN .row --> <div class="row"> <!-- BEGIN .footer-information --> <div class="footer-information"> <!-- BEGIN .content --> <div class="content"> <div class="align-left"> <p><?php esc_html_e("Copyright", 'swell-lite'); ?> © <?php echo date( esc_html__("Y", 'swell-lite') ); ?> · <?php esc_html_e("All Rights Reserved", 'swell-lite'); ?> · <?php bloginfo('name'); ?></p> <p><?php esc_html_e("Swell Lite", 'swell-lite'); ?> <?php esc_html_e("from", 'swell-lite'); ?> <a href="https://organicthemes.com" target="_blank"><?php esc_html_e("Organic Themes", 'swell-lite'); ?></a> · <a href="<?php bloginfo('rss2_url'); ?>"><?php esc_html_e("RSS Feed", 'swell-lite'); ?></a> </div> <?php if ( has_nav_menu( 'social-menu' ) ) { ?> <div class="align-right"> <?php wp_nav_menu( array( 'theme_location' => 'social-menu', 'title_li' => '', 'depth' => 1, 'container_class' => 'social-menu', 'menu_class' => 'social-icons', 'link_before' => '<span>', 'link_after' => '</span>', ) ); ?> </div> <?php } ?> <!-- END .content --> </div> <!-- END .footer-information --> </div> <!-- END .row --> </div> <!-- END .footer --> </div> <!-- END #wrapper --> </div> <?php wp_footer(); ?> </body> </html>
Ok. So I already have a child theme that a developer set up however I don’t know where to access it. Can you help me with that?
Also where do I find the footer.php file for the parent theme?
Hi Artnook,
Go to “Appearance” in your wpadmin dashboard. Click “Child Theme” Select footer.php as a template file and then press “copy template.”
Next, in the “Appearance” tab click Editor at the bottom. Then select ‘Theme Footer’ under Templates on the right and edit the text. Here you will highlight the existing code and paste in the code that Swayam provided above. (which will write over the existing code)
That should do the trick.
Hmmm…ok so there is no “child theme” under my “appearance.” I talked to the developer and he said my child theme changes will need to be made in a site specific plugin he created.
Also there is no “theme footer” under templates on the right in “editor” under “appearance.”
See screen shot. https://www.artnookaiken.com/wp-content/uploads/2016/01/Screen-Shot-2016-01-14-at-9.11.24-PM.png
Hi Art,
Sorry that didn’t work for you, I realize that “Child Theme” is only an option if you use the One-Click Child Theme plugin, which I do.I’m not sure which plugin your developer is using but if you click Plugins below Appearance you should be able to locate it. The reason why theme footer is not under templates is because you have not added it to your Child Theme yet.
I am not an expert on everything, yet I made the same edit you are looking to do on my website using the One Click Child Theme plugin. If that doesn’t work for you, someone with a bit more knowledge on WP will have to step in here to advise the last few steps for you.
Hi Folliclethought,
Ok. Thanks! I think I would like to use the child theme that I already have instead of downloading another plugin.
I think I will need to wait for another response on here or I will have to have my developer do it for $$…. ??
Thanks for your help though. I appreciate any feedback I can get.
Its not more then 10 mins of work, i think you can do it yourself, you just need to check your child theme folder name and then in that folder you need to put footer.php file (if you dont have, create one) and put that code which i pasted above, hope this helps ??
Ok. So I searched my child theme for anything called “footer” and nothing came up. I am guessing that means I need to create one? How do I do that?
Yes, you need to create one file called “footer.php”, and then place the code.
How do I create a new file in my child theme?
You could duplicate the footer.php file from the full version of the theme, add it to your child theme, and then edit the version of the file in your child theme.
I cannot find footer.php anywhere. I am starting to get really frustrated! I don’t know how to add a new file and I definitely don’t know where to find footer.php. Can someone give me a step by step?
I’m going to give you a much simpler solution. This will hide the login link using CSS. Just add the following code to your stylesheet:
.footer-information a:nth-child(3) { display: none; }
You should be able to find the stylesheet under Appearance > Editor. Otherwise, there are a number of plugins you can use to add styles to your theme.
Wow that is much easier. But will it remain after updates?
If you add the code to a child theme, or you could install the Jetpack plugin and activate the Edit CSS module. Either of those options will keep the edits after upgrading.
- The topic ‘Remove Log In Link’ is closed to new replies.