Hooks and Filters

How Can We Help?

Hooks and Filters

You are here:
< Back

Hooks and Filters

We have included numerous hooks and filters into the plugin which experience wordpress developers will be able to use to modify the behaviour of the plugin.  We are working on publishing the full set of these but in the meantime here are a few useful examples

Setting the default results view to grid

function my_default_view( $example ) {
return ‘grid’;
}
add_filter( ‘wppf_query_wppf_view’, ‘my_default_view’ );

Set the default drop-down values for Min Rent/Max (search forms)

function my_min_rent($rentlist) {
return array(100,150,200,250,300,350,400,450,500,600,700,800);
}
add_filter(‘wppf_filter_minrent’, ‘my_min_rent’);

function my_max_rent($rentlist) {
return array(600,700,800,1000,1500,2000);
}
add_filter(‘wppf_filter_maxrent’, ‘my_max_rent’);

Set the default drop-down values for Min/Max Price (search forms)

function my_min_price($rentlist) {
return array(25000,50000,60000,70000,80000,90000,100000,110000,120000,125000);
}
add_filter(‘wppf_filter_minprice’, ‘my_min_price’);

function my_max_price($rentlist) {
return array(100000,110000,120000,125000,130000,140000,150000,160000,170000,175000,180000,190000,200000);
}
add_filter(‘wppf_filter_maxprice’, ‘my_max_price’);