Frontpage block links to given url instead of get_permalink
authorLaury GvR <laury@gaslightmedia.com>
Wed, 3 Jul 2019 21:07:27 +0000 (17:07 -0400)
committerLaury GvR <laury@gaslightmedia.com>
Wed, 3 Jul 2019 21:07:27 +0000 (17:07 -0400)
parts/glm-blocks.php

index 125f5ac..f1ebf59 100644 (file)
@@ -13,7 +13,7 @@
                             <div class="post-excerpt excerpt<?php echo $count ?>"><?php echo the_advanced_excerpt('length=50&length_type=words&no_custom=1&ellipsis=%26hellip;&exclude_tags=img,p,strong,h1,h2,h3,hr,div'); ?>
                             </div>
                             <div class="read-more">
-                                <a href="<?php echo the_permalink(); ?>" class="post-link">Learn More</a>
+                                <a class="post-link" href="<?php echo $block->url;?>"<?php if($block->externalUrl){echo ' target="_blank"';}?>>Learn More</a>
                             </div>
                         </div>
                     </div>