Replacing a link with an image
-
I’m not sure how to put an image in place of the link that’s being echoed below. I want to make it a clickable image instead of the link. Thank you in advance : )
<div class="back-button"> <?php $this_page = get_post($id); $parent_id = $this_page->post_parent; if ($parent_id) { $parent = get_page($parent_id); echo '<a href="'.get_permalink($parent->ID).'" title="">'.get_the_title($parent->ID).'</a>'; } ?> </div>
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Replacing a link with an image’ is closed to new replies.