I am working on modifying the listing-listview.php file. I am trying to add multiple loops and I sort of have it working but if I try to add orderby to the query it returns nothing.
Here is the top part of my example. If I remove orderby it works. Is there a way to make this work?
<?php
$args = array(
'post_type' => 'gd_place',
'posts_per_page' => '1',
'orderby' => 'rand',
);
$query1 = new WP_Query($args);
if ( $query1->have_posts() ) :
/**
* Called inside the <code>ul</code> of the listings template, but before any <code>li</code> elements.
*
* When used by the widget view template then it will only show if there are listings to be shown.
*
* @since 1.0.0
* @see 'geodir_after_listing_post_listview'
*/
do_action('geodir_before_listing_post_listview');
while ( $query1->have_posts() ) : $query1->the_post();