Skip to content

Commit ce94130

Browse files
author
cristianraiber
committed
fixes #252; credits go to @laranz
1 parent bc5d858 commit ce94130

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

archive-jetpack-portfolio.php

+11-2
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
if ( 'sidebar-left' == $layout_class ) :
1313
get_sidebar();
1414
endif;
15+
16+
1517
?>
1618
<div id="primary" class="content-area col-md-8 mb-xs-24 <?php echo esc_attr( $layout_class ); ?>">
1719
<main id="main" class="site-main" role="main">
@@ -49,8 +51,15 @@
4951
<div class="image-tile inner-title hover-reveal text-center" style="<?php echo $item_style; ?>">
5052
<?php
5153
if ( has_post_thumbnail() ) {
54+
55+
$portfolio_custom_URL = get_post_meta( get_the_ID(), 'shapely_companion_portfolio_link', true );
56+
57+
if ( ! $portfolio_custom_URL ) {
58+
$portfolio_custom_URL = get_the_permalink();
59+
}
60+
5261
?>
53-
<a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>">
62+
<a href="<?php echo $portfolio_custom_URL; ?>" title="<?php the_title_attribute(); ?>">
5463
<?php
5564
if ( 'mansonry' == $layout ) {
5665
the_post_thumbnail( 'medium' );
@@ -70,7 +79,7 @@
7079
?>
7180
</div>
7281
</article><!-- #post-## -->
73-
<?php
82+
<?php
7483

7584
endwhile;
7685

0 commit comments

Comments
 (0)