• I want to add an anchor before the featured image of my page, so when I click “back to top” it goes to my featured image.
    However, it seems that I can only edit the html content after the featured image….
    The theme I’m using has a floating “back to top” button, but it links to the header not the featured image… 🙁

    Is there a way allowing me to edit all the html content in that page, including the featured image part?
    (Preferably in the WordPress interface…!)

    Thank you for your time reading my question.

Viewing 1 replies (of 1 total)
  • try this dude.

    <?php $url = wp_get_attachment_url( get_post_thumbnail_id($post->ID) );if( has_post_thumbnail() ) { ?>
    	<img src="<?php echo $url; ?>"  alt="<?php the_title(); ?>"/>
    <?php };?>
Viewing 1 replies (of 1 total)
  • The topic ‘Add an anchor before featured image?’ is closed to new replies.