• Hi. I am a complete newbie and not a programmer. I am trying to get the results of a search to center in my theme. The theme I am using is Constructor. The results are coming from a plugin called wp-property.
    Wp-property does not support my theme. Their stylesheet breaks the theme. So I am changing it to make it suport my theme.
    Their php file is property-overview php.
    I have changed the file as follows:

    <?php
     if ( have_properties() ) {
    
       $thumbnail_dimentions = WPP_F::get_image_dimensions($wpp_query['thumbnail_size']);
    
    ?>
    
    <div id="content" class="box shadow opacity <?php the_constructor_layout_class() ?>">
     <div id="container" div class="<?php wpp_css('property_overview::row_view', "wpp_row_view wpp_property_view_result"); ?>">
    
      <div class="<?php wpp_css('property_overview::all_properties', "all-properties"); ?>">
      <?php foreach ( returned_properties('load_gallery=false') as $property) {  ?>
    
        <div class="<?php wpp_css('property_overview::property_div', "property_div {$property['post_type']} clearfix"); ?>">
    
            <div class="<?php wpp_css('property_overview::left_column', "wpp_overview_left_column"); ?>" style="width:<?php echo $thumbnail_dimentions['width']+12; /* 12 is boubled image border */?>px; float:left; ">
              <?php property_overview_image(); ?>
            </div>
    
            <div class="<?php wpp_css('property_overview::right_column', "wpp_overview_right_column"); ?>" style="margin-left:<?php echo $thumbnail_dimentions['width']+12; /* 12 is boubled image border */?>px; ">
    
                <ul class="<?php wpp_css('property_overview::data', "wpp_overview_data"); ?>">
                    <li class="property_title">
                        <a> href="<?php echo $property['permalink']; ?>"><?php echo $property['post_title']; ?></a>
                        <?php if($property['is_child']): ?>
                            of <a> href='<?php echo $property['parent_link']; ?>'><?php echo $property['parent_title']; ?></a>
                        <?php endif; ?>
    
                <?php if($property['custom_attribute_overview'] || $property['tagline']): ?>
                    <li class="property_tagline">
                        <?php if($property['custom_attribute_overview']): ?>
                            <?php echo $property['custom_attribute_overview']; ?>
                        <?php elseif($property['tagline']): ?>
                            <?php echo $property['tagline']; ?>
                        <?php endif; ?>
    
                <?php endif; ?>
    
                <?php if($property['phone_number']): ?>
                    <li class="property_phone_number"><?php echo $property['phone_number']; ?>
                <?php endif; ?>
    
                <?php if($property['display_address']): ?>
                    <li class="property_address"><a>#property_map"><?php echo $property['display_address']; ?></a>
                <?php endif; ?>
    
                <?php if($property['price']): ?>
                    <li class="property_price"><?php echo $property['price']; ?>
                <?php endif; ?>
    
                <?php if($show_children && $property['children']): ?>
                <li class="child_properties">
                    <div class="wpd_floorplans_title"><?php echo $child_properties_title; ?></div>
                    <table class="wpp_overview_child_properties_table">
                        <?php foreach($property['children'] as $child): ?>
                        <tr class="property_child_row">
                            <th class="property_child_title"><a>"><?php echo $child['post_title']; ?></a></th>
                            <td class="property_child_price"><?php echo $child['price']; ?></td>
                        </tr>
                        <?php endforeach; ?>
                    </table>
    
                <?php endif; ?>
    
                <?php if(!empty($wpp_query['detail_button'])) : ?>
    
    <li><a> class="button" href="<?php echo $property['permalink']; ?>"><?php echo $wpp_query['detail_button'] ?></a></li>
                <?php endif; ?>
    
            </div><?php // .wpp_right_column ?>
                </div><?php // .property_div ?>
    
        <?php } /** end of the propertyloop. */ ?>
        </div><?php // .all-properties ?>
    	</div><?php // .wpp_row_view ?>
    <?php } else {  ?>
    <div class="wpp_nothing_found">
       <p><?php echo sprintf(__('Sorry, no properties found - try expanding your search, or <a href="%s">view all</a>.','wpp'), site_url().'/'.$wp_properties['configuration']['base_slug']); ?></p>
    </div>
    <?php } ?>
    <?php get_constructor_sidebar(); ?>

    [Please wrap all code in backticks]
    But the result I get can be seen on this page:
    https://www.test.shenzhenapartmentrental.com/?page_id=1200?wpp_search%5Bpagination%5D=off&wpp_search%5Barea%5D=+Luohu&wpp_search%5Bproperty_type%5D=movie_theatre&wpp_search%5Btype%5D=-1

    I just cannot seem to figure out how to center the content on the page. Any help would be really appreciated.

    Thanks so much!

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Getting a page to center’ is closed to new replies.