Hi. Entries, on category pages, are in order of publication date. I would like them to have the page order that I have assigned them. Where can I change it to make it look like this? How can I do it without a plugin?
Hey jeiceta,
It can only be done with a plugin if you want a custom order.
If you need further assistance please let us know.
Best regards,
Victoria
Thanks Victoria. Was the solution
Hi jeiceta,
Did you get it working for you with a plugin?
If you need further assistance please let us know.
Best regards,
Victoria
Hello Victoria. Yes, I managed to do it with a plugin. Thank you.
Hello Victoria. Finally if I need help.
I have to find where to put the orderby command to be able to sort the category pages in the frontend by menu order. But I can’t find the file that I have to modify or the exact place to change or place the order. Do you know what file it is?
Hi. I have achieved this by putting the following code in the template’s functions.php file
add_action( ‘pre_get_posts’, ‘dcms_order_content’ );
function dcms_order_content( $query ) {
if ( $query->is_main_query() && is_tax(‘pais’) ){
$query->set( ‘post_type’, ‘hitos_de_tenerife’ );
$query->set( ‘orderby’, ‘menu_order’ );
$query->set( ‘order’, ‘ASC’ );
}
return $query;
}