diff --git a/includes/shortcodes/post-links.php b/includes/shortcodes/post-links.php index 1afe934..86ccfe7 100644 --- a/includes/shortcodes/post-links.php +++ b/includes/shortcodes/post-links.php @@ -16,13 +16,11 @@ public function post_link_shortcode( $atts ) { if ( get_post_status( $post_id ) === 'publish' ){ $link_classes = $atts['class']; - $link_url = get_post_meta( $post_id, 'resource_url', true ); - - if ( empty( $link_url ) ){ - $link_url = post_permalink( $post_id ); - } - else{ + if (empty(get_the_content($post_id))){ $is_external = true; + $link_url = get_post_meta( $post_id, 'resource_url', true ); + } else { + $link_url = post_permalink( $post_id ); } $link_title = get_the_title( $post_id ); @@ -50,13 +48,12 @@ public function btn_list_shortcode( $atts ) { $link_list_html = '