Can somebody help me with one line of PHP (wordpress)?
I have a template where the following code creates the link for the featured image:
$output .= '<a href="' . esc_url( get_the_permalink( $post_id ) ) . '" class="entry-featured-image-url">';
now I need it changed, so that it links to an url specified in the custom field "ExternalUrl" with target blank and if there is no Url in that field, it links normaly (like it is now) to the permalink page (without target blank). I did stuff like this before in other templates but I am not good with PHP and having it in this format ($output .= ...) causes trouble for me..
|