• hi guys i bought wp residence real estate theme
    but technician team not support random sort for Properties List
    and this is the link for theme https://rio.wpresidence.net/area/flamengo/

    <?php
    global $current_adv_filter_search_label;
    global $current_adv_filter_category_label;
    global $current_adv_filter_city_label;
    global $current_adv_filter_area_label;
    global $current_adv_filter_county_label;
    global $wpestate_prop_unit;
    
    $current_name      =    '';
    $current_slug      =    '';
    $listings_list     =    '';
    $show_filter_area  =    '';
     
    if( isset($post->ID) ){
        $show_filter_area  =   get_post_meta($post->ID, 'show_filter_area', true);
    }
    
    $current_adv_filter_search_meta     = 'All Actions';
    $current_adv_filter_category_meta   = 'All Types';
    $current_adv_filter_city_meta       = 'All Cities';
    $current_adv_filter_area_meta       = 'All Areas';
    $current_adv_filter_county_meta     = 'All Counties/States';
            
    if( is_tax() ){
        $show_filter_area = 'yes';
        $current_adv_filter_search_label    =esc_html__('All Actions','wpresidence');
        $current_adv_filter_category_label  =esc_html__('All Types','wpresidence');
        $current_adv_filter_city_label      =esc_html__('All Cities','wpresidence');
        $current_adv_filter_area_label      =esc_html__('All Areas','wpresidence');
        $current_adv_filter_county_label    =esc_html__('All Counties/States','wpresidence');
    
        
        $taxonmy                            = get_query_var('taxonomy');
        $term                               = single_cat_title('',false);
        
        
        
        if ($taxonmy == 'property_city'){
            $current_adv_filter_city_label  =   ucwords( str_replace('-',' ',$term) );
            $current_adv_filter_city_meta   =   sanitize_title($term);
        }
        if ($taxonmy == 'property_area'){
            $current_adv_filter_area_label  =   ucwords( str_replace('-',' ',$term) );
            $current_adv_filter_area_meta   =   sanitize_title($term);
        }
        if ($taxonmy == 'property_category'){
            $current_adv_filter_category_label  =   ucwords( str_replace('-',' ',$term) );
            $current_adv_filter_category_meta   =   sanitize_title($term);
        }
        if ($taxonmy == 'property_action_category'){
            $current_adv_filter_search_label    =   ucwords( str_replace('-',' ',$term) );
            $current_adv_filter_search_meta     =   sanitize_title($term);
        }
        if ($taxonmy == 'property_county_state'){
            $current_adv_filter_county_label    =   ucwords( str_replace('-',' ',$term) );
            $current_adv_filter_county_meta     =   sanitize_title($term);
        }
        
    }
    
    if(is_page_template('property_list.php')){
        
        $current_adv_filter_search_action   =   get_post_meta ( $post->ID, 'adv_filter_search_action', true);
        if($current_adv_filter_search_action[0]=='all'){
            $current_adv_filter_search_label    =esc_html__('All Actions','wpresidence');
            $current_adv_filter_search_meta     = 'All Actions';
        }else{
            $current_adv_filter_search_label    =   ucwords( str_replace('-',' ',$current_adv_filter_search_action[0]) );
            $current_adv_filter_search_meta     =   sanitize_title($current_adv_filter_search_action[0]);
        }
       
    
        $current_adv_filter_search_category =   get_post_meta ( $post->ID, 'adv_filter_search_category', true);    
        if($current_adv_filter_search_category[0]=='all'){
            $current_adv_filter_category_label  =esc_html__('All Types','wpresidence');
            $current_adv_filter_category_meta   = 'All Types';
        }else{
            $current_adv_filter_category_label  =   ucwords( str_replace('-',' ',$current_adv_filter_search_category[0]) );
            $current_adv_filter_category_meta   =   sanitize_title($current_adv_filter_search_category[0]);
        }
         
       // county / state fielter
        $current_adv_filter_county        =   get_post_meta ( $post->ID, 'current_adv_filter_county', true);
        if(isset($current_adv_filter_county[0])){
            if($current_adv_filter_county[0]=='all'){
                $current_adv_filter_county_label      =esc_html__('All Counties/States','wpresidence');
                $current_adv_filter_county_meta       = 'All Counties/States';
            }else{
                $current_adv_filter_county_label  =   ucwords( str_replace('-',' ',$current_adv_filter_county[0]) );
                $current_adv_filter_county_meta   =   sanitize_title($current_adv_filter_county[0]);
            }
        }
       
       
        $current_adv_filter_area        =   get_post_meta ( $post->ID, 'current_adv_filter_area', true);
        if($current_adv_filter_area[0]=='all'){
            $current_adv_filter_area_label      =esc_html__('All Areas','wpresidence');
            $current_adv_filter_area_meta       = 'All Areas';
        }else{
            $current_adv_filter_area_label  =   ucwords( str_replace('-',' ',$current_adv_filter_area[0]) );
            $current_adv_filter_area_meta   =   sanitize_title($current_adv_filter_area[0]);
        }
        
        
        $current_adv_filter_city        =   get_post_meta ( $post->ID, 'current_adv_filter_city', true);
        if($current_adv_filter_city[0]=='all'){
            $current_adv_filter_city_label      =esc_html__('All Cities','wpresidence');
            $current_adv_filter_city_meta       = 'All Cities';
        }else{
            $current_adv_filter_city_label  =   ucwords( str_replace('-',' ',$current_adv_filter_city[0]) );
            $current_adv_filter_city_meta   =   sanitize_title($current_adv_filter_city[0]);
        }
    }
    
    $selected_order         = esc_html__('Sort by','rand');
    $listing_filter         =   '';
    if( isset($post->ID) ){
        $listing_filter         = get_post_meta($post->ID, 'listing_filter',true );
    }
    $listing_filter_array   = array(
                                "1"=>esc_html__('rand',''),
                                "2"=>esc_html__('Price Low to High','rand'),
                                "3"=>esc_html__('Newest first','wpresidence'),
                                "4"=>esc_html__('Oldest first','wpresidence'),
                                "5"=>esc_html__('Bedrooms High to Low','wpresidence'),
                                "6"=>esc_html__('Bedrooms Low to high','wpresidence'),
                                "7"=>esc_html__('Bathrooms High to Low','wpresidence'),
                                "8"=>esc_html__('Bathrooms Low to high','wpresidence'),
                                "0"=>esc_html__('Default','random')
                            );
        
    
    $args_local = wpestate_get_select_arguments();
    
    foreach($listing_filter_array as $key=>$value){
        $listings_list.= '<li role="presentation" data-value="'.esc_html($key).'">'.esc_html($value).'</li>';//escaped above
        if($key==$listing_filter){
            $selected_order     =   $value;
            $selected_order_num =   $key;
        }
    }   
          
    
    $order_class='';
    if( $show_filter_area != 'yes' ){
        $order_class=' order_filter_single ';  
    }
            
    if( $show_filter_area=='yes' ){
    
            if ( is_tax() ){
                $curent_term    =   get_term_by( 'slug', get_query_var( 'term' ), get_query_var( 'taxonomy' ) );
                $current_slug   =   $curent_term->slug;
                $current_name   =   $curent_term->name;
                $current_tax    =   $curent_term->taxonomy; 
            }
    
        $action_select_list =   wpestate_get_action_select_list($args_local);
        $categ_select_list  =   wpestate_get_category_select_list($args_local);
        $select_county_list =   wpestate_get_county_state_select_list($args_local);
        $select_city_list   =   wpestate_get_city_select_list($args_local); 
        $select_area_list   =   wpestate_get_area_select_list($args_local);
        
             
    }// end if show filter
    
    ?>
    
        <?php if( $show_filter_area=='yes' ){  
            ?>
        <div class="listing_filters_head"> 
            <input type="hidden" id="page_idx" value="<?php 
                    if ( !is_tax() && !is_category() ) { 
                       print intval($post->ID);
                    }?>">
          
             
                    <div class="dropdown listing_filter_select" >
                      <div data-toggle="dropdown" id="a_filter_action" class="filter_menu_trigger" data-value="<?php print esc_attr($current_adv_filter_search_meta);?>"> <?php print esc_html($current_adv_filter_search_label);?> <span class="caret caret_filter"></span> </div>           
                      <ul  class="dropdown-menu filter_menu" role="menu" aria-labelledby="a_filter_action">
                          <?php print trim($action_select_list);?>
                      </ul>        
                    </div>
    
                    <div class="dropdown listing_filter_select" >
                      <div data-toggle="dropdown" id="a_filter_categ" class="filter_menu_trigger" data-value="<?php print esc_attr($current_adv_filter_category_meta);?>"> <?php print esc_html($current_adv_filter_category_label);?> <span class="caret caret_filter"></span> </div>           
                      <ul  class="dropdown-menu filter_menu" role="menu" aria-labelledby="a_filter_categ">
                          <?php print trim($categ_select_list);?>
                      </ul>        
                    </div>                           
              
    
                    <div class="dropdown listing_filter_select filter_county" >
                      <div data-toggle="dropdown" id="a_filter_county" class="filter_menu_trigger" data-value="<?php print esc_attr($current_adv_filter_county_meta);?>"> <?php print esc_html($current_adv_filter_county_label);?> <span class="caret caret_filter"></span> </div>           
                      <ul id="filter_county" class="dropdown-menu filter_menu" role="menu" aria-labelledby="a_filter_county">
                          <?php print trim($select_county_list);?>
                      </ul>        
                    </div> 
    	 
            
                    <div class="dropdown listing_filter_select" >
                      <div data-toggle="dropdown" id="a_filter_cities" class="filter_menu_trigger" data-value="<?php print esc_attr($current_adv_filter_city_meta);?>"> <?php print esc_html($current_adv_filter_city_label);?> <span class="caret caret_filter"></span> </div>           
                      <ul id="filter_city" class="dropdown-menu filter_menu" role="menu" aria-labelledby="a_filter_cities">
                          <?php print trim($select_city_list);?>
                      </ul>        
                    </div>  
           
                    
                    <div class="dropdown listing_filter_select" >
                      <div data-toggle="dropdown" id="a_filter_areas" class="filter_menu_trigger" data-value="<?php print esc_attr($current_adv_filter_area_meta);?>"><?php print esc_html($current_adv_filter_area_label);?><span class="caret caret_filter"></span> </div>           
                      <ul id="filter_area" class="dropdown-menu filter_menu" role="menu" aria-labelledby="a_filter_areas">
                          <?php print trim($select_area_list);?>
                      </ul>        
                    </div> 
           
           
            
            <div class="dropdown listing_filter_select order_filter <?php print esc_attr($order_class);?>">
                <div data-toggle="dropdown" id="a_filter_order" class="filter_menu_trigger" data-value="<?php echo esc_html($selected_order_num);?>"> <?php echo esc_html($selected_order); ?> <span class="caret caret_filter"></span> </div>           
                 <ul id="filter_order" class="dropdown-menu filter_menu" role="menu" aria-labelledby="a_filter_order">
                     <?php print trim($listings_list); ?>                   
                 </ul>        
            </div> 
    
            <?php
            $prop_unit_list_class    =   '';
            $prop_unit_grid_class    =   'icon_selected';
            if($wpestate_prop_unit=='list'){
                $prop_unit_grid_class="";
                $prop_unit_list_class="icon_selected";
            }
    
            ?>    
            
            <div class="listing_filter_select listing_filter_views">
                <div id="grid_view" class="<?php echo esc_html($prop_unit_grid_class); ?>"> 
                    <i class="fa fa-th"></i>
                </div>
            </div>
    
            <div class="listing_filter_select listing_filter_views">
                 <div id="list_view" class="<?php echo esc_html($prop_unit_list_class); ?>">
                     <i class="fa fa-bars"></i>                   
                 </div>
            </div>
              <div data-toggle="dropdown" id="a_filter_county" class="" data-value="<?php print esc_attr($current_adv_filter_county_meta);?>"></div> 
        </div> 
        <?php }else{
        ?>
            <div data-toggle="dropdown" id="a_filter_action" class="" data-value="<?php print esc_attr($current_adv_filter_search_meta);?>"></div>           
            <div data-toggle="dropdown" id="a_filter_categ" class="" data-value="<?php print esc_attr($current_adv_filter_category_meta);?>"></div>           
            <div data-toggle="dropdown" id="a_filter_cities" class="" data-value="<?php print esc_attr($current_adv_filter_city_meta);?>"></div>           
            <div data-toggle="dropdown" id="a_filter_areas" class="" data-value="<?php print esc_attr($current_adv_filter_area_meta);?>"></div>           
            <div data-toggle="dropdown" id="a_filter_county" class="" data-value="<?php print esc_attr($current_adv_filter_county_meta);?>"></div>           
                  
        <?php
        } 
    ?>      

    can any one help me to make it as random plzzzzzzzzz

    and thanks

    • This topic was modified 4 years, 9 months ago by Jan Dembowski. Reason: Moved to Fixing WordPress, this is not an Developing with WordPress topic

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Moderator t-p

    (@t-p)

    i bought wp residence real estate theme

    Did you buy it from:
    https://themeforest.net/item/wp-residence-real-estate-wordpress-theme/7896392

    OR

    https://wpresidence.net/

    In either case, for commercial product support please contact the author directly on their site. In order to be good stewards of the WordPress community, and encourage innovation and progress, we feel it’s important to direct people to those official locations.

    Forum volunteers are also not given access to commercial products, so they would not know why your commercial theme or plugin is not working properly. This is one other reason why volunteers forward you to the commercial product’s vendors. The vendors are responsible for supporting their commercial product.

    As the author is aware, commercial products are not supported in these forums.

    • This reply was modified 4 years, 9 months ago by t-p.
Viewing 1 replies (of 1 total)
  • The topic ‘Random Properties List’ is closed to new replies.