No longer kept up to date.
Please see Sridhar's fork.
//change sort order to price high to low | |
add_action( 'pre_get_posts', 'gsc_listing_price_sort_order' ); | |
function gsc_listing_price_sort_order( $query ) { | |
if( !is_admin() && is_post_type_archive( 'listing' ) ) { | |
$query->set( 'meta_key', '_listing_price_sortable' ); | |
$query->set( 'orderby', 'meta_value_num' ); | |
$query->set( 'order', 'desc' ); //list high to low |
add_filter( 'agentpress_featured_listings_widget_loop', 'agentpress_featured_listings_widget_loop_filter' ); | |
/** | |
* Filter the loop output of the AgentPress Featured Listings Widget. | |
* | |
*/ | |
function agentpress_featured_listings_widget_loop_filter( $loop ) { | |
$loop = ''; /** initialze the $loop variable */ | |
$loop .= sprintf( '<a href="%s">%s</a>', get_permalink(), genesis_get_image( array( 'size' => 'feature-community' ) ) ); |
No longer kept up to date.
Please see Sridhar's fork.
// This snippet goes in functions.php | |
add_filter('agentpress_featured_listings_widget_loop', 'child_ap_listings_loop_filter', 10, 1 ); | |
/** | |
* Adds some additional button classes to the more link | |
* | |
* These button classes are already defined in the theme | |
* style.css file. Adding them to the listing wrap "more link" | |
* will give the "View Listing" buttons styling that is | |
* consistent with the theme. | |
*/ |
<?php | |
add_filter( 'agentpress_featured_listings_widget_loop', 'child_featured_listings_widget_loop' ); | |
/** | |
* This code will replace the "," left behind in AgentPress feature listing widget after | |
* the listing detail IDs have been changed. | |
* Change the IDs to suit your needs. | |
*/ | |
function child_featured_listings_widget_loop( $loop ){ |