Adding Sidebar Photo With Code
-
When my website was created last year my developer created my blog static page. I wanted to change the photo in the upper right corner but I screwed up the coding and now there is no photo. The photo was never a Widget..it was written into the code. I went to “Editor” and then “Sidebar” to try and edit it.
This is what is currently there and there used to be code for a photo after the first two lines. If you go to my blog (http://www.thebabshop.com/blog), there used to be a photo above “Hello! I’m Carolyn”
<div id="sidebar"> <div class="sidebar-item" id="sidebar-header"> <p>Hello! I'm Carolyn</p> <p><a href="mailto:hello@thebabshop.com">hello@thebabshop.com</a></p> </div>
-
Try this:
<div id="sidebar"> <div class="sidebar-item" id="sidebar-header"> <img src="[URL of photo goes here]"/> <p>Hello! I'm Carolyn</p> <p><a href="mailto:hello@thebabshop.com">hello@thebabshop.com</a></p> </div>thanks! i tried that – no photo showed up but there is a mini little icon barely visible now ?? If you go to my blog you can see it to the upper left corner of the sidebar.
I attached the url of a photo in my media library.
What is the URL of the photo you’re trying to add?
also – how do I know what to size it, or resize it in code? i think it is too big. thanks!
Start with this:
<div id="sidebar"> <div class="sidebar-item" id="sidebar-header"> <img src="http://thebabshop.com/blog/wp-content/uploads/2015/12/BBP-Andrea-RyanWedding-237.jpg"/> <p>Hello! I'm Carolyn</p> <p><a href="mailto:hello@thebabshop.com">hello@thebabshop.com</a></p> </div>Assuming that works, adjust the size like so:
<img src="http://thebabshop.com/blog/wp-content/uploads/2015/12/BBP-Andrea-RyanWedding-237.jpg" width="250" height="375"/>it worked! thank you so much!!
You’re welcome!
The topic ‘Adding Sidebar Photo With Code’ is closed to new replies.