Archived topic
Adding logo and social media in the footer without widget
11 replies · Started by Riccardo on May 31, 2019
Hi, I want to add a logo and social media icons ( fb, instagrma and email ) to my footer bar but not as widgets. The goal is to have a clean bar at the botton of my page. I add two picture ( one is the real bar and one the bar I want to have, is photoshopped) Here is the link:
https://ibb.co/Y0CqkJ6
https://ibb.co/nP1Nd3z
Thank you.
Riccardo Plez
http://www.rp-design.it
Hi there,
Why don't you want to use widgets? You could likely use hooks instead, but it will involve writing your own HTML/CSS.
Thank you Tom for the reply. I explained the problem not well. I add widgets to the footer, If you see in my homepage http://rp-design.it right now I have the copyright on the left, the social icons on the right and above the icons my logo. I want the logo to be on the left and the text of the copyright in the middle. Pelase can you help me to do this change? Thank you very much
Got it, will need some tweaking.
1. Remove the current copyright with some PHP:
add_filter( 'generate_copyright', '__return_empty_string' );
2. Add the copyright to another text widget in your Footer Bar area.
Once you do that let me know and I'll provide some CSS to align them properly :)
Thanks! I did it, I removed the copyright and add a text as a widget. Now the only thing to do is changing and align the elements: the logo on the left, the copyright text in the middle and the social icons on the right. Can you provide me a CSS to do it?
:)
Hi there,
try this CSS:
.footer-bar {
display: flex;
width: 100%;
align-items: center;
}
.footer-bar aside {
margin-bottom: 0 !important;
}
.footer-bar aside:nth-child(2) {
margin: auto;
}
Then you just to re-order the three widgets to set the order you would need.
Perfect! It works well. Thanks
Glad to hear that :)
Hello GP,
I found this solution which works perfectly. However, it is a bit sad we have to loose the auto-updating copyright date feature. Any chance we could eventually get a GP_CopyrightWidget that we could put instead of a plain text widget?
Alex
Are you talking about the auto updated year?
You can create a shortcode to add inside HTML widget:
add_shortcode( 'footer_year', 'lh_footer_year' );
function lh_footer_year() {
ob_start();
echo date('Y');
return ob_get_clean();
}
Then you can use shortcode [footer_year]
Thanks Leo. Works like a charm! Just need to change the function name to lh_footer_year.
Oh yeah sorry. Good catch!