From 2dead414b1bb01a6b63eba46f43c4b956e7623a6 Mon Sep 17 00:00:00 2001 From: Stefan Bohacek Date: Sun, 12 Mar 2023 16:53:00 -0400 Subject: [PATCH] Always use permalink for resources. --- includes/shortcodes/post-links.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/includes/shortcodes/post-links.php b/includes/shortcodes/post-links.php index 77c3f6a..1afe934 100644 --- a/includes/shortcodes/post-links.php +++ b/includes/shortcodes/post-links.php @@ -187,11 +187,13 @@ public function link_cards_shortcode( $atts ) { foreach ($post_ids as $post_id) { if ( get_post_status( $post_id ) === 'publish' ){ - $link_url = get_post_meta( $post_id, 'resource_url', true ); + $link_url = post_permalink( $post_id ); - if ( empty( $link_url ) ){ - $link_url = post_permalink( $post_id ); - } + // $link_url = get_post_meta( $post_id, 'resource_url', true ); + + // if ( empty( $link_url ) ){ + // $link_url = post_permalink( $post_id ); + // } $link_title = get_post_meta( $post_id, 'card_title', true ); if ( empty( $link_title ) ){