Opal-Estate-Pro/templates/content-property-featured-v1.php

68 lines
2.7 KiB
PHP
Raw Permalink Normal View History

2019-09-10 06:27:33 +02:00
<?php
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
global $property, $post;
$property = opalesetate_property( get_the_ID() );
?>
<article itemscope itemtype="http://schema.org/Property" <?php post_class( 'property-featured-v1' ); ?>>
<div class="property-featured">
<div class="featured-info">
<div class="entry-content">
<div class="property-group-label">
<?php opalestate_property_label(); ?>
</div>
<?php the_title( '<h4 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h4>' ); ?>
<div class="entry-summary">
<div class="property-address">
<?php if ( $property->latitude && $property->longitude ) : ?>
<a href="<?php echo esc_url( $property->get_google_map_link() ); ?>" rel="nofollow" target="_blank">
2019-09-28 09:21:28 +02:00
<span class="property-view-map"><i class="fas fa-map-marker-alt"></i></span>
2019-09-10 06:27:33 +02:00
</a>
<?php endif; ?>
<?php if ( $property->get_address() ) : ?>
<span class="property-address__text"><?php echo esc_html( $property->get_address() ); ?></span>
<?php endif; ?>
</div>
<p class="property-description">
2019-10-01 05:49:29 +02:00
<?php echo opalestate_fnc_excerpt( 38, '...' ); ?>
2019-09-10 06:27:33 +02:00
</p>
</div>
</div><!-- .entry-content -->
2019-09-28 06:09:04 +02:00
<?php opalestate_get_loop_short_meta(); ?>
2019-09-10 06:27:33 +02:00
<div class="property-meta-bottom">
<?php opalestate_property_loop_price(); ?>
</div>
<?php do_action( 'opalestate_after_property_loop_item' ); ?>
</div>
<header class="property-featured__header">
<div class="property-group-status">
<?php opalestate_property_status(); ?>
</div>
<?php
if ( has_post_thumbnail() ) {
$image = get_the_post_thumbnail_url( get_the_ID(), opalestate_get_option( 'loop_image_size', 'large' ) );
} else {
$image = opalestate_get_image_placeholder( opalestate_get_option( 'loop_image_size', 'large' ) );
}
?>
<div class="property-bg-thumbnail">
<a href="<?php echo esc_url( get_permalink() ); ?>" style="background-image:url('<?php echo esc_url( $image ); ?>')"></a>
</div>
<div class="entry-content-bottom clearfix">
<?php echo wp_kses_post( $property->render_author_link() ); ?>
<?php echo do_shortcode( '[opalestate_favorite_button property_id=' . get_the_ID() . ']' ); ?>
</div>
</header>
</div> <!-- .property-featured -->
<meta itemprop="url" content="<?php the_permalink(); ?>"/>
</article><!-- #post-## -->