Sort Coupons by Listing Type

WordPress Business Themes Forums Responsive Themes Coupon Theme Sort Coupons by Listing Type Reply To: Sort Coupons by Listing Type

Discontinued - The forum content is out of date. For theme support please use our support desk here.

WordPress Business Themes Forums Responsive Themes Coupon Theme Sort Coupons by Listing Type Reply To: Sort Coupons by Listing Type


  • ppt_retaildiscountcodes20-03-19_92369175
    Newbie 2 points

    Okay! I have inserted the query in _functions.php file, but there’s another issue.
    After applying query, the sorting works but why my all the header and styling is disturbed?

    function _custom_order($wp_obj){

    if (!is_admin() && !$wp_obj->is_main_query() && !is_front_page())
    {
    echo ‘log’;
    $wp_obj->set(‘meta_key’, ‘type’);
    $wp_obj->set(‘orderby’, ‘meta_value’);
    $wp_obj->set(‘order’, ‘ASC’);

    }

    }
    add_action( ‘pre_get_posts’, array( $this, ‘_custom_order’ ) );

    May 18, 2019 at 10:47 am
  • Didn't find what you were after?

    Chat with us now

    or contact our support team