ameliapower
Member
Posted 8 months ago #
I have a newbie question about inserting images into the file. Is it wrong to include say social icons in the footer.php file? I tried to do it that way and they wouldn't show up.
I've been rooting around and it seems maybe they are put in as background images in the css file, maybe like this:
background: url(images/twitter-M.png) left no-repeat.
url(images/flickr-M.png) left no-repeat,
url(images/linkedin-M.png) left no-repeat;
Any help would be great. Thanks
There are a couple of ways, you would create a div to contain and style the icons!
UNTESTED
<!-- Start Social Icons -->
<div class="my-social">
<a href="http://twitter.com/twittername" target="_blank">
<img src="<?php echo get_stylesheet_directory_uri(); ?>/images/twitter.png" title="Follow Us" alt="Follow Us" />
</a>
<a href="mailto:support@mysite.com" target="_blank">
<img src="<?php echo get_stylesheet_directory_uri(); ?>/images/email.png" title="Contact Us" alt="Contact Us" />
</a>
</div>
<!-- End Social Icons -->
The way I do it is with a settings page and template part, but you might be able to work it out using hard coded values from this posts
Then you could add a style and use icons and a navigation menu.
HTH
David
ameliapower
Member
Posted 8 months ago #
Thanks again David. That worked very well.