WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Replacing a link with an image (3 posts)

  1. davidzupec
    Member
    Posted 1 year ago #

    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>
  2. 1-jah
    Member
    Posted 1 year ago #

    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?

  3. davidzupec
    Member
    Posted 1 year ago #

    Thanks, I figured it out.

Topic Closed

This topic has been closed to new replies.

About this Topic