• Resolved thindpls

    (@thindpls)


    Below is what I currently have in php file. It links all feature images to a single url- I need each image to go to a different url. is this possible?

    function wpb_autolink_featured_images( $html, $post_id, $post_image_id ) {
    $html = ‘‘ . $html . ‘‘;
    return $html;

    }

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter thindpls

    (@thindpls)

    Is it possible to have a featured image as a hyperlink to external source? Without plugin I can get it to work, once the plugin is activated it stops.

    Plugin Author Bill Erickson

    (@billerickson)

    While this plugin does not support linking the image to external urls as-is, there are two ways you could accomplish it:

    1. If the post doesn’t need to be accessible on your site, you could use a plugin like Page Links To to redirect the post to the external URL. The image would still link to the post permalink, but that would then redirect to the desired URL.

    2. If you’re comfortable with code, you could use the output filter to customize the output of the featured image and link it to a custom URL (stored as post metadata) instead of the post’s URL.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Feature Image Link’ is closed to new replies.