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();
Try ordering by another value?This reply has been marked as private.
Have you already tried one of the widgets or shortcodes with sorting options to see if you could get random results near what you are looking for?
Here in GD support we don’t do customization, focusing instead on bugs and regular improvements that benefit the whole community.
Would you be interested in having GD experts contact you about implementing your customization request?
Hey, Alex thanks so much for your help. A widget won’t work. I would love to have an expert contact me. What do you need from me to make that happen?This reply has been marked as private.
The topic ‘Modify Listing Listview’ is closed to new replies, this may be for inactivity, please open a new topic if you have a similar question.