Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Adding Pro Ajax Search to WP Pro Real Estate 7 › Reply To: Adding Pro Ajax Search to WP Pro Real Estate 7
Hi- Sorry, the page was set to private.
Here is the layout of the current Portflio Listing
Current Results
I want to add ASP to this page layout. I modified the ASP horizontal results page, but here
But I have been unable to match the layout of the original Portfolio Listing.
modified horizontal.php
[code]
<?php
/* Prevent direct access */
defined(‘ABSPATH’) or die("You can’t access this file directly.");
/**
* This is the default template for one horizontal result
*
* !!!IMPORTANT!!!
* Do not make changes directly to this file! To have permanent changes copy this
* file to your theme directory under the "asp" folder like so:
* wp-content/themes/your-theme-name/asp/horizontal.php
*
* It’s also a good idea to use the actions to insert content instead of modifications.
*
* You can use any WordPress function here.
* Variables to mention:
* Object() $r – holding the result details
* Array[] $s_options – holding the search options
*
* DO NOT OUTPUT ANYTHING BEFORE OR AFTER THE <div class=’item’>..</div> element
*
* You can leave empty lines for better visibility, they are cleared before output.
*
* MORE INFO: https://wp-dreams.com/knowledge-base/result-templating/
*
* @since: 4.0
*/
?>
<div class=’vc_row wpb_row vc_row-fluid item listing col standard<?php echo apply_filters(‘asp_result_css_class’, $asp_res_css_class); ?>’>
<?php do_action(‘asp_res_horizontal_begin_item’); ?>
<?php
$propertyid = $r->id;
$ct_property_type = strip_tags( get_the_term_list( $propertyid, ‘property_type’, ”, ‘, ‘, ” ) );
$price = get_post_meta( $r->id, ‘_ct_price’, true );
$sqft = get_post_meta( $r->id, ‘_ct_sqft’, true );
$lotsize = get_post_meta( $r->id, ‘_ct_lotsize’, true );
$beds = strip_tags( get_the_term_list( $r->id, ‘beds’, ”, ‘, ‘, ” ) );
$baths = strip_tags( get_the_term_list( $r->id, ‘baths’, ”, ‘, ‘, ” ) );
$thumbnail = get_the_post_thumbnail( $r->id);
$description = strip_tags(get_post_field(‘post_content’, $r->id));
$shortdescription = substr($description,0,200);
$link = $r->link;
$status_tags = strip_tags( get_the_term_list( $propertyid, ‘ct_status’, ”, ‘ ‘, ” ) );
$city = strip_tags( get_the_term_list( $r->id, ‘city’, ”, ‘, ‘, ” ) );
$state = strip_tags( get_the_term_list( $r->id, ‘state’, ”, ‘, ‘, ” ) );
$zip = strip_tags( get_the_term_list( $r->id, ‘zipcode’, ”, ‘, ‘, ” ) );
$alttitle = get_post_meta( $r->id, ‘_ct_listing_alt_title’, true );
?>
<?php if (!empty($r->image)): ?>
<a>link; ?>’<?php echo ($s_options[‘results_click_blank’])?" ‘ target=’_blank’":""; ?>>
<figure>
<?php
if($status_tags != ”){
echo ‘<h6 class="snipe status ‘;
$status_terms = get_the_terms( $propertyid, ‘ct_status’, array() );
foreach ( $status_terms as $term ) {
echo esc_html($term->slug) . ‘ ‘;
}
echo ‘"style="display:block">’;
echo ‘<span>’;
echo esc_html($status_tags);
echo ‘</span>’;
echo ‘</h6>’;
}
echo ‘<div class="propertyThumb">’.$thumbnail.’</div>’;
echo ‘<span class="prop-type-icon"><i class="fa fa-home"></i></span>’;
?>
</figure>
</a>
<?php endif; ?>
<?php do_action(‘asp_res_horizontal_after_image’); ?>
<div class=’asp_content’>
<div class="grid-listing-info">
<header>
<h5><a>link; ?>’<?php echo ($s_options[‘results_click_blank’])?" target=’_blank’":""; ?>><?php echo $alttitle; ?>
<?php if ($s_options[‘resultareaclickable’] == 1): ?>
<span class=’overlap’></span>
<?php endif; ?>
</a></h5>
<p class="location marB0"><?php echo $city;?>, <?php echo $state;?> <?php echo $zip;?></p>
</header>
</div>
<div class=’etc’>
<?php if ($s_options[‘showauthor’] == 1): ?>
<span class=’asp_author’><?php echo $r->author; ?></span>
<?php endif; ?>
<?php if ($s_options[‘showdate’] == 1): ?>
<span class=’asp_date’><?php echo $r->date; ?></span>
<?php endif; ?>
</div>
<?php if ($s_options[‘showdescription’] == 1): ?>
<?php if (!empty($r->image) && $s_options[‘hhidedesc’] == 0): ?>
<?php echo $r->content; ?>
<?php endif; ?>
<?php endif; ?>
</div>
<?php do_action(‘asp_res_horizontal_after_content’); ?>
<div class=’clear’></div>
<?php do_action(‘asp_res_horizontal_end_item’); ?>
</div>[/code]