• Its been suggested that by using a custom sort order plugin we can arrange a custom sort over the default of newest published, new to old.
    I’ve tried this but not had much luck getting it to work. It seems to say I need to paste code into the page (from the plugins custom query) but I cant see where or how it interacts with staffer.
    So instead, could anyone tell me where in the php I can edit to adjust the sql to call by post title instead (or any other field)?

    • This topic was modified 7 years, 8 months ago by webfeat.
Viewing 1 replies (of 1 total)
  • Thread Starter webfeat

    (@webfeat)

    I have tried amending inc/staffer-grid.php by adding

    $args = array(
    				'post_type' => 'staff',
    				'pagination'	=> true,
    				'posts_per_page' => $postsperpage, 
    				'paged' => $paged
    				'orderby'   => 'post_title',
    				'order'     => 'DESC'
                );	
              $the_query = new WP_Query( $args );		
    

    this is followed by if (have_posts() ) : ?>. Most of the above was already there, I just un-commented it

    but it didnt do anything

    • This reply was modified 7 years, 8 months ago by webfeat. Reason: additional code
Viewing 1 replies (of 1 total)
  • The topic ‘Sort order’ is closed to new replies.