• Resolved davidzupec

    (@davidzupec)


    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)
  • If you’re looking to do what I think you’re gonna do, you can add the image in you style.css file. Might have to play with it for placement. But you’re trying to make that section or link be a clickable button or image still following the same path right?

    Thread Starter davidzupec

    (@davidzupec)

    Thanks, I figured it out.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Replacing a link with an image’ is closed to new replies.