diff --git a/inc/property/class-opalestate-property.php b/inc/property/class-opalestate-property.php index a5a302e0..f3b498fc 100755 --- a/inc/property/class-opalestate-property.php +++ b/inc/property/class-opalestate-property.php @@ -207,10 +207,10 @@ class Opalestate_Property { } /** - * + * Is featured? */ public function is_featured() { - return 'on' === $this->featured; + return ( 'on' === $this->featured ) || ( 1 == $this->featured ); } /** @@ -315,7 +315,7 @@ class Opalestate_Property { } /** - * + * Get location. */ public function get_locations() { $terms = wp_get_post_terms( $this->post_id, 'opalestate_location' ); @@ -515,7 +515,7 @@ class Opalestate_Property { * @access public * @param $key * @param $single - * @return string + * @return string|array */ public function get_metabox_value( $key, $single = true ) { return get_post_meta( $this->post_id, OPALESTATE_PROPERTY_PREFIX . $key, $single ); @@ -579,7 +579,7 @@ class Opalestate_Property { * @return array */ public function get_gallery() { - return $this->get_metabox_value( 'gallery', true ); + return $this->get_metabox_value( 'gallery' ); } /** @@ -677,7 +677,6 @@ class Opalestate_Property { return $this->get_metabox_value( 'attachments' ); } - public function get_content_single_layout() { return $this->get_metabox_value( 'layout' ); } diff --git a/inc/property/class-opalestate-search.php b/inc/property/class-opalestate-search.php index f1ce4341..9f6365e5 100755 --- a/inc/property/class-opalestate-search.php +++ b/inc/property/class-opalestate-search.php @@ -243,11 +243,11 @@ class OpalEstate_Search { if ( ! empty( $ksearchs ) && count( $ksearchs ) == 2 ) { $args['meta_key'] = OPALESTATE_PROPERTY_PREFIX . $ksearchs[0]; - $args['orderby'] = 'meta_value_num'; + $args['orderby'] = 'meta_value'; $args['order'] = $ksearchs[1]; } elseif ( 'on' == opalestate_options( 'show_featured_first', 'off' ) ) { $args['meta_key'] = OPALESTATE_PROPERTY_PREFIX . 'featured'; - $args['orderby'] = 'meta_value_num'; + $args['orderby'] = 'meta_value'; $args['order'] = 'DESC'; }