Quantcast
Channel: WordPress.org Forums » All Topics
Viewing all articles
Browse latest Browse all 59525

How do I utilize the custom sort order with a query?

$
0
0

Replies: 0

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 18 minutes ago by jasonfell.

Viewing all articles
Browse latest Browse all 59525

Trending Articles