• Massive Ant
    December 12, 2014 at 2:22 am #101185

    Which file (page template) would I edit? single-estate_property.php?

    If I want to remove or move “Property Features” section…
    What chunk of code would I comment out or move?

    If I want to remove or move “Agent Notes” section…
    What chunk of code would I comment out or move?

    Thank You

    • This topic was modified 2 years, 3 months ago by  Massive Ant.
    Roxana
    December 12, 2014 at 12:32 pm #101197

    Hi Massive Ant

    Front end page is single-estate_property.php

    If I want to remove or move “Property Features” section…
    What chunk of code would I comment out or move?

    –> look for Property Features and delete all code related. Use this as example for your next question please.

    $property_features_text = icl_translate('wpestate','wp_estate_property_features_text', esc_html( get_option('wp_estate_property_features_text') ) );

    $property_features_text = esc_html( get_option('wp_estate_property_features_text') );

           <?php 
                            // features and ammenties
                            $counter            =   0;                          
                            $feature_list_array =   array();
                            $feature_list       =   esc_html( get_option('wp_estate_feature_list') );
                            $feature_list_array =   explode( ',',$feature_list);
                            $total_features     =   round( count( $feature_list_array )/2 );
                           
                            if ( !count( $feature_list_array )==0 ){ //  if are features and ammenties
                            ?>
                            <h4 id="prop_ame">
                            <?php 
                            if($property_features_text ==''){
                                _e('Amenities and Features', 'wpestate'); 
                            }else{
                                print $property_features_text ;
                            }
                            ?>
                            </h4>
                        
                                <?php 
                                $show_no_features= esc_html ( get_option('wp_estate_show_no_features','') );
                                if($show_no_features!='no'){
                                     print'    <div class="prop_details"><ul>';
                                     foreach($feature_list_array as $checker => $value){
                                          
                                            if (function_exists('icl_translate') ){
                                                $value     =   icl_translate('wpestate','wp_estate_property_custom_amm_'.$value, $value ) ;                                      
                                            }
                                    
                                    
                                            $counter++;
                                            if ($counter == ($total_features+1) ) {
                                                print'</ul></div><div class="prop_details"><ul>';
                                            }
                                            $post_var_name=  str_replace(' ','_', trim($value) );
    
                                            if (esc_html( get_post_meta($post->ID, $post_var_name, true) ) == 1) {
                                                print '<li><img src="' . get_template_directory_uri() . '/images/yes_prop.png" alt="yes"/>' . trim($value) . '</li>';
                                            }else{
                                                print '<li><img src="' . get_template_directory_uri() . '/images/no_prop.png" alt="no"/>' . trim($value). '</li>';
                                            }
                                      }
                                     print'</ul>     </div>';
                                }else{
                                     foreach($feature_list_array as $checker => $value){
                                        $post_var_name=  str_replace(' ','_', trim($value) );
                                         
                                        if (function_exists('icl_translate') ){
                                            $value     =   icl_translate('wpestate','wp_estate_property_custom_amm_'.$value, $value ) ;                                      
                                        }
                                    
                                            
                                        if (esc_html( get_post_meta($post->ID, $post_var_name, true) ) == 1) {
                                            print '<div class="features_listing_div"><img src="' . get_template_directory_uri() . '/images/yes_prop.png" alt="yes"/>' . trim($value) . '</div>';
                                        }
                                    }
                               }
                            ?>
                            
                            
                            <?php 
                            } // end if are features and ammenties
                            ?>
                            

    Make backup before in case it doesn’t work. These codes need to be tested.

    If I want to remove or move “Agent Notes” section…
    What chunk of code would I comment out or move?

    ` < ?php $message = esc_html( get_post_meta($post->ID, ‘property_sale_pitch’, true) );
    if ($message != ”) {
    print ‘

    ‘;
    _e(‘Agent Notes’, ‘wpestate’);
    print ‘

    ‘ . $message.’

    ‘;
    }
    ?>
    `
    Thank You

You must be logged in to reply to this topic.

'
Contact Us

We're not around right now. But you can send us an email and we'll get back to you, asap.