'auto-listing', 'order' => 'DESC', ); $the_query = new WP_Query( $args ); get_header( 'listings' ); /** * Outputs opening divs for the content * * @hooked auto_listings_output_content_wrapper (outputs opening divs for the content) */ do_action( 'auto_listings_before_main_content' ); ?>
have_posts() ) : /** * Before listings * * @hooked auto_listings_ordering (the ordering dropdown) * @hooked auto_listings_view_switcher (the view switcher) * @hooked auto_listings_pagination (the pagination) */ do_action( 'auto_listings_before_listings_loop' ); $cols = auto_listings_columns(); $count = 1; while ( $the_query->have_posts() ) : $the_query->the_post(); if ( $count % $cols == 1 ) echo ''; $count++; endwhile; if ( $count % $cols != 1 ) echo ''; wp_reset_postdata(); /** * The pagination * * @hooked auto_listings_pagination (the pagination) */ do_action( 'auto_listings_after_listings_loop' ); else : ?>