-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #470 from EarthJournalismNetwork/develop
Develop
- Loading branch information
Showing
9 changed files
with
67 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,4 +7,11 @@ | |
color: #F5F5F5; | ||
} | ||
} | ||
} | ||
|
||
|
||
.post-type-archive-storymap { | ||
.taxonomy-description { | ||
display: none; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
59 changes: 26 additions & 33 deletions
59
themes/jeo-theme/template-parts/content/content-related-posts.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,32 @@ | ||
<?php | ||
$posts = guaraci\related_posts::get_posts(get_the_id(), 3)->posts; | ||
$posts_ids = []; | ||
foreach($posts as $key=>$value) { | ||
array_push($posts_ids, $value->ID); | ||
} | ||
|
||
$posts_query_args['post__in'] = $posts_ids; | ||
|
||
$related_posts = new \WP_Query($posts_query_args); | ||
$posts = guaraci\related_posts::get_posts(get_the_ID(), 3)->posts; | ||
?> | ||
<?php if(sizeof($related_posts->posts) >= 3 && sizeof($posts_ids) != 0 && get_option('related_posts__use', false)): ?> | ||
<div class="related-posts"> | ||
<p class="title-section"><?= __('Related Posts', 'jeo') ?></p> | ||
<?php if (sizeof($posts) >= 3 && sizeof($posts) != 0 && get_option('related_posts__use', false)) : ?> | ||
<div class="related-posts"> | ||
<p class="title-section"><?= __('Related Posts', 'jeo') ?></p> | ||
|
||
<div class="posts"> | ||
<?php foreach($related_posts->posts as $key=>$value): ?> | ||
<div class="post"> | ||
<?php if(get_the_post_thumbnail($value->ID)) : ?> | ||
<div class="thumbnail"> | ||
<a class="thumbnail-inner" href="<?php echo get_permalink($value->ID) ?>" target="blank"> | ||
<?php echo get_the_post_thumbnail($value->ID) ?> | ||
</a> | ||
</div> | ||
<?php endif ?> | ||
<div class="entry-container"> | ||
<p class="title"> | ||
<a href="<?php echo get_permalink($value->ID) ?>" target="blank"> | ||
<?php echo $value->post_title ?> | ||
</a> | ||
</p> | ||
<p class="date"><?php echo get_the_time('F j, Y', $value->ID); ?></p> | ||
<p class="excerpt"><?php echo get_the_excerpt($value->ID) ?></p> | ||
</div> | ||
<div class="posts"> | ||
<?php foreach ($posts as $key => $value) : ?> | ||
<div class="post"> | ||
<?php if (get_the_post_thumbnail($value->ID)) : ?> | ||
<div class="thumbnail"> | ||
<a class="thumbnail-inner" href="<?php echo get_permalink($value->ID) ?>" target="blank"> | ||
<?php echo get_the_post_thumbnail($value->ID) ?> | ||
</a> | ||
</div> | ||
<?php endforeach; ?> | ||
<?php endif ?> | ||
<div class="entry-container"> | ||
<p class="title"> | ||
<a href="<?php echo get_permalink($value->ID) ?>" target="blank"> | ||
<?php echo $value->post_title ?> | ||
</a> | ||
</p> | ||
<p class="date"><?php echo get_the_time('F j, Y', $value->ID); ?></p> | ||
<p class="excerpt"><?php echo get_the_excerpt($value->ID) ?></p> | ||
</div> | ||
</div> | ||
</div> | ||
<?php if ($key >= 2) break; ?> | ||
<?php endforeach; ?> | ||
</div> | ||
</div> | ||
<?php endif ?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters