- This topic has 1 reply, 2 voices, and was last updated 3 weeks, 3 days ago by .
-
Topic
-
I would like to make use of ordering for a records database using MB Custom Table. I have created a custom post type for the records and am able to display all data correctly in a php template.
Using the WordPress, ‘orderby’ arg does not work. My custom posts are just displaying in the order they were posted.
$args = array( 'post_type' => 'cemetery-records', 'posts_per_page'=>20, 'orderby'=>'last_name', 'order'=>'ASC', 'paged' => $paged ); $loop = new WP_Query( $args )
This makes sense to me because it is looking in the WordPress tables, not my custom table. However, I am having trouble finding documentation on how to order them differently based on the data in the custom table. Can you point me in the right direction?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- You must be logged in to reply to this topic.