Skip to content

Commit dd29e25

Browse files
latest project links open websites instead of post
1 parent 2398bcb commit dd29e25

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

sections/latest_news.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171

7272
echo '<div class="latestnews-img">';
7373

74-
echo '<a class="latestnews-img-a" href="'.get_permalink().'" title="'.get_the_title().'">';
74+
echo '<a class="latestnews-img-a" href="'.get_post_meta(get_the_ID(), 'url', true).'" target="_blank" title="'.get_the_title().'">';
7575

7676
if ( has_post_thumbnail() ) :
7777
the_post_thumbnail();
@@ -85,7 +85,7 @@
8585

8686
echo '<div class="latesnews-content">';
8787

88-
echo '<h3 class="latestnews-title"><a href="'.get_permalink().'" title="'.get_the_title().'">'.get_the_title().'</a></h3>';
88+
echo '<h3 class="latestnews-title"><a href="'.get_post_meta(get_the_ID(), 'url', true).'" target="_blank" title="'.get_the_title().'">'.get_the_title().'</a></h3>';
8989

9090
the_excerpt();
9191

@@ -105,7 +105,7 @@
105105
echo '<div class="item '.$active.'">';
106106
echo '<div class="col-md-3 latestnews-box">';
107107
echo '<div class="latestnews-img">';
108-
echo '<a class="latestnews-img-a" href="'.get_permalink().'" title="'.get_the_title().'">';
108+
echo '<a class="latestnews-img-a" href="'.get_post_meta(get_the_ID(), 'url', true).'" target="_blank" title="'.get_the_title().'">';
109109
if ( has_post_thumbnail() ) :
110110
the_post_thumbnail();
111111
else:

0 commit comments

Comments
 (0)