Hi there!
I’m using the following code to use a custom image in my WP Show Posts list.
Now I have created another list in WP Show Posts and I only want the code to be applied to one of the lists.
How can I restrict the code to only the list I need?
add_action( 'wpsp_before_title', 'tu_add_custom_meta' );
function tu_add_custom_meta() {
$image = get_field('logotipo');
$permalink = get_permalink();
if ( isset( $image ) && '' !== $image ) {
echo '<div class="av-logotipo"><a href="' . $permalink . '"><img src="' . $image . '"></a></div>';
}
}
Thanks!
Daniel