I created a blog for Wordpress for images. By posting all the posts, I did not use the wordpress editor to upload images. Instead, I used FillaZilla to upload images. Then, in the wordpress editor, I manually wrote only the image tag (below) in all posts and posted it. All messages do not contain text, but only images. Like this,
<img alt="" title="" src=""></img>
Now what I want to ask is that I want the images in all messages to receive automatic hyperlinks, the same as the src image. I have over 200 Wordpress blog posts. I do not want to edit them all one at a time. Here's the encoding of the wordpress content area,
<div class="post-entry">
<p><img src='http://www.mywebsite.com/wp-content/uploads/2012/04/sun.jpg' title="sun" alt="sun" /></p>
</div>
Can someone help me with this? How can I add a hyperlink to images? Is there any code that I can put in a div after writing wordpress themes on my page?
@ chandu-vkm explained (in the comments) exactly what I was looking for. Now I have one more question. When I add a span tag in front of img, the @ chandu-vkm code mentioned does not allow adding a span tag immediately before the img tag. Instead, it places the place tag outside the p tag, as in the code below.
<div class="post_div">
<span class="entry"></span>
<p>
<img src='http://www.mywebsite.com/wp-content/uploads/2012/04/sun.jpg' title="Cute Teddy Bear" alt="Cute Teddy Bear" />
</p>
</div>
But I want the range to be placed immediately after p, like this.
<div class="post_div">
<p>
<span class="entry"></span>
<img src='http://www.mywebsite.com/wp-content/uploads/2012/04/sun.jpg' title="Cute Teddy Bear" alt="Cute Teddy Bear" />
</p>
</div>
Someone please help me.
source
share