Widget Question
Support Area › Forums › Foundation › Widget Question
- This topic has 5 replies, 2 voices, and was last updated 13 years, 4 months ago by
Bill Robbins.
-
AuthorPosts
-
September 22, 2011 at 21:26 #3721
David Bagwell
ParticipantI need a widget that would allow me to place an image that would fit perfectly within the widget box w/o a title.
I am going to use this for special links to pages and for ads.
Can you help me?
David
September 23, 2011 at 09:03 #3727Bill Robbins
ModeratorDavid,
One option is to actually use a text widget. To use one of these with the Foundation theme, you’d need to size your image to 290 pixels wide (the height can be variable). Once that’s done, go to Media in your WordPress control panel and select add new. Upload the resized image and once it’s finished copy the URL to the image file that WordPress gives you.
Now go to your widget section and drag a text widget into the sidebar where you’d like to include the image. Paste this code in the body of the text widget:
<img src=”http://www.yoursite.com/image.jpg” />
Just replace the http://www.yoursite.com/image.jpg with the URL you copied earlier. To make the image a link, use this code:
<a href=”http://www.yourlink.com” rel=”nofollow”><img src=”http://www.yoursite.com/image.jpg” /></a>
Here replace the http://www.yourlink.com with the URL you’d like the image to link to in addition to the image URL.
Click save and you now have an image in the sidebar with the ability to have optional links.
If you’re going to have quite a few ads, you’ll probably want to use an add plugin. That will let you track clicks, rotate them and even sell them in some situations.
Enjoy your weekend and let me know if you have any other questions,
BillSeptember 24, 2011 at 11:46 #3742David Bagwell
ParticipantBill,
I followed your directions, but all i get is a ? with a square around it where the image should be. The ” /> is that causing the issue?
September 24, 2011 at 13:42 #3743Bill Robbins
ModeratorDavid,
I’m afraid this is a causality of me learning how to use our new forum. When I tried entering the code of an image, the reply kept trying to display the image instead of the code for one.
Here’s a link to the code on Pastebin: http://pastebin.com/B2rV99KL
Use that copy from and see if that doesn’t work better for you.
September 24, 2011 at 20:10 #3744David Bagwell
ParticipantThis is the code I am using and I followed your directions and it is still not working. Am not doing something right?
September 25, 2011 at 07:39 #3747Bill Robbins
ModeratorDavid,
It looks like you’re missing the last ” after the .jpg
Try adding that and see if that doesn’t pull your image up.
AuthorPostsViewing 6 posts - 1 through 6 (of 6 total)- The topic ‘Widget Question’ is closed to new replies.