Skip to content

Commit

Permalink
show special episodes along with stories
Browse files Browse the repository at this point in the history
  • Loading branch information
dphiffer committed Nov 27, 2024
1 parent e15fe37 commit fd82dd9
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions wp-content/themes/mediasanctuary/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -320,9 +320,20 @@ function is_story_post($post) {
return true;
}
}
$special_episode = get_field('special_episode', $post);
if (!empty($special_episode)) {
return true;
}
return false;
}

add_filter('the_title', function($title, $post) {
if (get_field('special_episode', $post)) {
return get_field('special_episode_title', $post);
}
return $title;
}, 10, 2);

add_action('pre_get_posts', function($query) {
if ($query->is_main_query() && $query->get('post_type') == 'peoplepower') {
if (empty($_GET['sort']) || $_GET['sort'] == 'recent') {
Expand Down

0 comments on commit fd82dd9

Please sign in to comment.