Thank you in advance for your time. I am new to WordPress and am beginning to learn how to develop themes and your Quark is such a great help to me. I cannot seem to figure out an easy way to add social media links that match those in the header into the footer. Do I need to install a social media plugin or do I need to edit some of the php code? Thanks again for any help.
You can either do php customizations for adding social icons in your theme, otherwise you can use one of these plugins for achieving what you want:
A simple method is to use Simple Social Icons plugin; after that you will see in Appearance>Widgets some special widgets loaded once you activate this plugin. Just drag the widgets in the Footer Widget (right side) and there you will be able to do some custom settings about how you want to appear your icons, url adress etc.
You don’t need to use any plugins. Quark is already using the Font Awesome icon font to display the social links that you see in the header. As you would’ve no doubt seen, you can set the url’s for these social icons in the Theme Options page.
If you simply want to replicate the icons that are in the header, exactly as they are, but in the footer, then you can simply call the function that I created.
If you have a look in header.php, you’ll see the following…
<div class="social-media-icons"> <?php echo quark_get_social_media(); ?> </div>
If you copy those couple of lines and add them to your footer.php template, it will output the icons exactly as they appear in the header. If you’ve created a child theme, then simply copy the footer.php file and add it to your child theme folder, and then add those three lines of code wherever you want the icons to appear.
I would definitely prefer to not use additional plugins. Maybe I wasn’t clear enough in my original post. What I want to do is add the same social media that appears in the header (defined under “Theme Options”) to the “Fourth Footer Widget Area”. But unlike the header, I want the list to be vertical instead of horizontal (not a problem, I can do that with CSS). What I was hoping for was a way to just add it like I would any other widget. I can just add a text widget and hard code the social media HTML in there but I was hoping for a dynamic way in case I add additional social media through the “Theme Options”. Any thoughts? I can easily add the code you indicated previously into the footer.php but I was unsure how this would affect the 4 Footer Widget Areas. Thanks again for your time and wisdom.
If you want to be able to add the content into a widget, I would suggest duplicating that function I mentioned above (& renaming it), and then using it to create a simple shortcode that you can then use within the widget.
If you’re not familiar with Shortcodes, then I would suggest having a look at this tutplus article on creating Shortcodes.
@ahortin, this is PERFECT. Exactly what I wanted. Thank you for all your hard work. This theme is GREAT!
- The topic ‘Adding Social Media to Footer’ is closed to new replies.