This website uses cookies to personalize your experience. By using this website you agree to our cookie policy.

Reply To: Adding Pro Ajax Search to WP Pro Real Estate 7

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

#19067
LAideasLAideas
Participant

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

Beta ASP Layout

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; ?&gt;’&lt;?php echo ($s_options[‘results_click_blank’])?" ‘ target=’_blank’":""; ?&gt;&gt;
&lt;figure&gt;

&lt;?php
if($status_tags != ”){
echo ‘&lt;h6 class="snipe status ‘;
$status_terms = get_the_terms( $propertyid, ‘ct_status’, array() );

foreach ( $status_terms as $term ) {
echo esc_html($term-&gt;slug) . ‘ ‘;
}

echo ‘"style="display:block"&gt;’;
echo ‘&lt;span&gt;’;
echo esc_html($status_tags);
echo ‘&lt;/span&gt;’;
echo ‘&lt;/h6&gt;’;
}
echo ‘&lt;div class="propertyThumb"&gt;’.$thumbnail.’&lt;/div&gt;’;
echo ‘&lt;span class="prop-type-icon"&gt;&lt;i class="fa fa-home"&gt;&lt;/i&gt;&lt;/span&gt;’;
?&gt;
&lt;/figure&gt;

</a>
&lt;?php endif; ?&gt;

&lt;?php do_action(‘asp_res_horizontal_after_image’); ?&gt;

&lt;div class=’asp_content’&gt;

&lt;div class="grid-listing-info"&gt;
&lt;header&gt;
&lt;h5&gt;<a>link; ?&gt;’&lt;?php echo ($s_options[‘results_click_blank’])?" target=’_blank’":""; ?&gt;&gt;&lt;?php echo $alttitle; ?&gt;
&lt;?php if ($s_options[‘resultareaclickable’] == 1): ?&gt;
&lt;span class=’overlap’&gt;&lt;/span&gt;
&lt;?php endif; ?&gt;
</a>&lt;/h5&gt;
&lt;p class="location marB0"&gt;&lt;?php echo $city;?&gt;, &lt;?php echo $state;?&gt; &lt;?php echo $zip;?&gt;&lt;/p&gt;
&lt;/header&gt;
&lt;/div&gt;
&lt;div class=’etc’&gt;

&lt;?php if ($s_options[‘showauthor’] == 1): ?&gt;
&lt;span class=’asp_author’&gt;&lt;?php echo $r-&gt;author; ?&gt;&lt;/span&gt;
&lt;?php endif; ?&gt;

&lt;?php if ($s_options[‘showdate’] == 1): ?&gt;
&lt;span class=’asp_date’&gt;&lt;?php echo $r-&gt;date; ?&gt;&lt;/span&gt;
&lt;?php endif; ?&gt;

&lt;/div&gt;

&lt;?php if ($s_options[‘showdescription’] == 1): ?&gt;
&lt;?php if (!empty($r-&gt;image) &amp;&amp; $s_options[‘hhidedesc’] == 0): ?&gt;
&lt;?php echo $r-&gt;content; ?&gt;
&lt;?php endif; ?&gt;
&lt;?php endif; ?&gt;

&lt;/div&gt;

&lt;?php do_action(‘asp_res_horizontal_after_content’); ?&gt;

&lt;div class=’clear’&gt;&lt;/div&gt;

&lt;?php do_action(‘asp_res_horizontal_end_item’); ?&gt;

&lt;/div&gt;[/code]