• Resolved jasonfell

    (@jasonfell)


    Here is what I have so far. I looked into the database to see if I could locate a proper field to sort by to no avail. I just want to preserve the manually-sorted order that I have in the admin area on the page where this data is being displayed.

    `
    $args = array(
    ‘numberposts’ => 9999,
    ‘post_type’ => ‘portfolio’,
    ‘order’ => ‘DESC’,
    ‘orderby’ => ‘post_date’,
    ‘post_status’ => ‘publish’
    );

    $portfolio = wp_get_recent_posts( $args );
    `

    • This topic was modified 5 years, 7 months ago by jasonfell.
Viewing 1 replies (of 1 total)
  • Hello @jasonfell,

    Thank you for reaching out to us!
    Please replace orderby => post_date with orderby => menu_order

    This should do it.

    All the best,
    Mihaela

Viewing 1 replies (of 1 total)
  • The topic ‘How do I utilize the custom sort order with a query?’ is closed to new replies.