Skip to content

Commit

Permalink
Always use permalink for resources.
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanbohacek committed Mar 12, 2023
1 parent 5f3ecba commit 2dead41
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions includes/shortcodes/post-links.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 ) ){
Expand Down

0 comments on commit 2dead41

Please sign in to comment.