Created
March 30, 2022 13:36
-
-
Save laranz/92536a0f36d17ac1292beb00fcca9dd4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_shortcode('post_image_website_link', 'post_image_website_link'); | |
function post_image_website_link($atts) { | |
$postID = get_the_ID(); | |
$website_link = geodir_get_post_meta( $postID, 'website', true ); | |
$thumbnail = get_the_post_thumbnail( $postID, 'full' ); | |
return '<div class="featured-image">' | |
. '<a href="' . $website_link . '">' | |
. $thumbnail | |
. '</a>' | |
. '</div>'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment