HI Guys,
I’m using the ‘post type order’ plug in with Enfold to sort my posts into date listings.
I’m using tags to give each listing a location. I would like to edit the tag (location) link to show the menu order rather than the post published order (as it currently is) –
I know I need to add – 'orderby' => 'menu_order'
– to the either the tags.php or my child theme functions.php, what would be the best option.
Many thanks, Chunk.
Hi Alstair!
Thank you for using Enfold.
Please try the following filter in the functions.php file.
function ava_pre_get_posts_mod( $query ) {
if ( is_archive() ) {
$query->set( 'orderby', 'menu_order' );
$query->set( 'order', 'ASC' );
}
}
add_action( 'pre_get_posts', 'ava_pre_get_posts_mod' );
Regards,
Ismael