• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

WP SITES

2665

Original Genesis Tutorials & 5000+ Guaranteed Code

Snippets

  • Support
  • Newsletter
  • Videos
  • Log in

Premium Member? - Request custom code

Custom Link Any Featured Image To Any URL

This tutorial provides 2 of the easiest and most efficient ways to add a custom link to any featured image.

The 1st custom function can simply be pasted in your child themes functions file. No need to edit parent theme files which are lost after theme updates.

By default, featured images link back to the post permalink however this solution makes changing that, very simple.

Here’s the demo video which shows you what this solution does:

On top of determining the URL your images link to, the code also enables you to very easily:

  • Set the image size
  • Determine the position of the image
  • Add a custom class for the image
  • Custom linking of featured images on single posts & default linking of archive thumbnails to single post permalinks ( This is the default )
  • Link both archive thumbnails & single post featured images to custom URL’s

All you need to do is paste the URL into a field and press save.

post-thumbail-link-url

The 1st solution works in genesis and the 2nd in non genesis themes.

Here’s both code snippets:

Register for full access

Related Code

  • Modify Featured Images on Single Posts
  • Add Featured Image Before or After Single Post Title

Featured Image

Reader Interactions

Leave a Reply Cancel reply

You must be logged in to post a comment.

Primary Sidebar

PHP Code

template_include

get_body_class

if else

array

class_exists

foreach

sprintf

add_action

printf

variable

Advertise · WPEngine · Genesis · Log in

  • How Premium Membership Works
  • Sign Up
  • Support
  • Subscription Details/Invoice
  • Tagged Tutorials
  • Access-Download Problems