Good afternoon everyone, I have little experience in php programming and I have a problem with the featured images. Use Advanced Custom Field’s and create a field where i put a URL. Need when click in the featured image this take the URL of ACF and open in new tab. I found this code where the featured image call the link, but i need to put my custom URL.
if ( $args['apply_link'] ) {
$out_escaped .= '<a class="g1-frame" href="' . esc_url( apply_filters( 'the_permalink', get_permalink( $post ), $post ) ) . '">';
$out_escaped .= '<span class="g1-frame-inner"' . $inner_style_escaped . '>';
if ( $args['use_microdata'] ) {
$out_escaped .= get_the_post_thumbnail( null, $args['size'], array( 'itemprop' => 'contentUrl' ) );
} else {
$out_escaped .= get_the_post_thumbnail( null, $args['size'] );
}
$out_escaped .= '<span class="g1-frame-icon"></span>';
I dont know how to call my custom URL to add in featured image. The code of ACF is ?php the_field('custom_url'); ?>
Some idea to work properly?
thank you very much in advance.