Skip to content

Commit

Permalink
fixup story/testimonial post type order
Browse files Browse the repository at this point in the history
  • Loading branch information
openmindculture committed Sep 19, 2024
1 parent 57ea296 commit 29706cd
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions src/inc/structure/stories.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,16 @@
*/
?>
<?php
$is_presorted = is_plugin_active('post-types-order/post-types-order.php');
$orderby = $is_presorted ? 'menu_order' : null;
$args = array(
'post_type' => 'story',
'lang' => pll_current_language(),
'posts_per_page' => -1
'posts_per_page' => -1,
'orderby' => $orderby,
);
$the_query = new WP_Query( $args );
$resorted_post_ids = array();
$is_presorted = is_plugin_active('post-types-order/post-types-order.php');
if ($is_presorted) {
echo '*** post_types_order plugin is active, ignore position_number ***';
} else {
echo '*** use position_number ***';
}
if ( $the_query->have_posts() ) : ?>

<section id="stories" class="stories target-offset">
Expand Down

0 comments on commit 29706cd

Please sign in to comment.