Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1263147

    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?

    • This topic was modified 4 years ago by jeiceta.
    #1263324

    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

    #1263423

    Thanks Victoria. Was the solution

    #1263566

    Hi jeiceta,

    Did you get it working for you with a plugin?

    If you need further assistance please let us know.

    Best regards,
    Victoria

    #1263598

    Hello Victoria. Yes, I managed to do it with a plugin. Thank you.

    #1263691

    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?

    #1263722

    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;
    }

    #1264356

    Hi,

    Glad to know it is solved. Please do not hesitate to open a new thread if you need anything else. We will close this one for now.

    Have an awesome day!

    Best regards,
    Ismael

Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘How to put the posts on the category pages in the order of the articles?’ is closed to new replies.