Search Divi Plus Documentation

Search for answers or browse our knowledge base.

< All Topics
Print

How To Order Posts by Menu in DP Team Slider

To Order the posts by Menu in the DP Team Slider please add this code to your Divi Theme Options

function custom_team_member_order( $query ) {
if ( !is_admin() && $query->get( ‘post_type’ ) == ‘dipl-team-member’ ) {
$query->set( ‘orderby’, ‘menu_order’ );
$query->set( ‘order’, ‘ASC’ );
}
}
add_action( ‘pre_get_posts’, ‘custom_team_member_order’ );

This will arrange your DP Team Members in the slider module in the menu order.

Was this article helpful?
0 out Of 5 Stars
5 Stars 0%
4 Stars 0%
3 Stars 0%
2 Stars 0%
1 Stars 0%
How can we improve this article?
Please submit the reason for your vote so that we can improve the article.