Sunday, 8 October 2017

Price Sort Number Value Wordpress Meta Value

/*Price Sort Number Value*/ function alter_query_so_15250127($query) {
if ( !is_admin() && $query->is_main_query() && is_archive()) {

$query->set('post_type','listings');
$query->set('meta_key', 'price_value');
$query->set('orderby', 'meta_value_num');
$query->set('order', 'DESC');

}
}
add_action('pre_get_posts','alter_query_so_15250127');

2 comments:

  1. {/*top nav*/
    $('.nav-tabs > li a').hover(
    function() {
    var ahref = $(this).attr("href");
    ahref = ahref.split("#");
    $(".tab-content .tab-pane").hide();
    $(".nav-tabs > li").removeClass("active");
    $(this).closest("li").addClass("active");
    $("#"+ahref[1]).show();
    },
    function() { }
    );
    /*top nav*/

    ReplyDelete

Google Map Filter Api Example

Here is Google Map Filter Api Example: