php DirectoryEngine:说明自动填充所有空白处
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了php DirectoryEngine:说明自动填充所有空白处相关的知识,希望对你有一定的参考价值。
.detail-place-right-wrapper .description-place-wrapper {
width: 100%;
}
.detail-place-right-wrapper .info-address-place-wrapper {
overflow: hidden;
background: rgba(22, 144, 163, 0.41);
padding: 10px;
box-sizing: border-box;
}
.info-address-place-wrapper img {
max-width: 100%;
}
.detail-place-right-wrapper .info-header {
display: inline-block;
}
@media (max-width: 1170px) {
.detail-place-right-wrapper .description-place-wrapper {
width: 100%;
max-width: none;
}
}
<?php
global $post, $ae_post_factory;
$place_obj = $ae_post_factory->get('place');
$place = $place_obj->current_post;
?>
<div class="section-detail-wrapper padding-top-bottom-20 print-only">
<div class="description-place-wrapper print-only">
<!--// place gallery -->
<div class="content-description">
<div class="info-address-place-wrapper">
<div itemscope itemtype="http://schema.org/ImageObject">
<span class="img-small-place">
<img itemprop="contentUrl" width="300" alt="<?php the_title(); ?>" src="<?php echo $place->the_post_thumnail; ?>" >
</span>
</div>
<!-- place info -->
<div class="info-address-place print-only">
<ul>
<li>
<div itemprop="address" itemscope itemtype="http://schema.org/PostalAddress">
<span class="address-place" <?php _e("Address", ET_DOMAIN); ?> itemprop="addressLocality">
<i class="fa fa-map-marker"></i>
<?php echo ($place->et_full_location) ? $place->et_full_location : __( 'No specify address' , ET_DOMAIN );; ?>
</span>
</div>
<div itemprop="geo" itemscope itemtype="http://schema.org/GeoCoordinates">
<meta itemprop="latitude" content="<?php echo $place->et_location_lat; ?>" />
<meta itemprop="longitude" content="<?php echo $place->et_location_lng; ?>" />
</div>
</li>
<?php if($place->et_phone){ ?>
<li>
<span itemprop="telephone" class="phone-place" <?php _e("Phone", ET_DOMAIN); ?>>
<i class="fa fa-phone"></i><?php echo ($place->et_phone) ? $place->et_phone : __( 'No specify phone' , ET_DOMAIN );; ?>
</span>
</li>
<?php } ?>
<!-- <span class="mail-place"><i class="fa fa-envelope"></i>1231 2123</span> -->
<?php if($place->et_url){ ?>
<li>
<span class="website-place" title="<?php _e("Website", ET_DOMAIN); ?>">
<i class="fa fa-link"></i>
<?php
echo ($place->et_url) ? '<a rel="nofollow" href="http://'.str_replace(array('http://', 'https://'), '',$place->et_url ) .'" >'.$place->et_url.'</a>' : __( 'No specify website' , ET_DOMAIN );;
?>
</span>
</li>
<?php } ?>
<li>
<span class="time-place" title="<?php _e("Open days", ET_DOMAIN); ?>">
<i class="fa fa-calendar"></i>
<?php de_serve_day($place->serve_day); ?>
</span>
</li>
<?php if($place->open_time && $place->close_time){ ?>
<li>
<span class="time-place">
<i class="fa fa-clock-o"></i>
<?php
if($place->open_time && $place->close_time) {
printf(__("%s to %s", ET_DOMAIN), $place->open_time, $place->close_time);
}else{
// no specify serve time
if(!$place->open_time && !$place->close_time) {
_e("No specify serve time", ET_DOMAIN);
}
// specify open time
if( $place->open_time ) {
printf(__("Open at: %s", ET_DOMAIN) , $place->open_time);
}
// specify close time
if( $place->close_time ) {
printf(__("Close at: %s", ET_DOMAIN) , $place->close_time );
}
}
?>
</span>
</li>
<?php } ?>
<?php if($place->et_fb_url){ ?>
<li>
<span class="website-place" title="<?php _e("Facebook", ET_DOMAIN); ?>">
<i class="fa fa-facebook"></i>
<?php
echo ($place->et_fb_url) ? '<a rel="nofollow" target="_blank" href="http://'.str_replace(array('http://', 'https://'), '',$place->et_fb_url ) .'" >'.$place->et_fb_url.'</a>' : __( 'No specify Facebook link' , ET_DOMAIN );
?>
</span>
</li>
<?php } ?>
<?php if($place->et_google_url){ ?>
<li>
<span class="website-place" title="<?php _e("Google plus", ET_DOMAIN); ?>">
<i class="fa fa-google-plus"></i>
<?php
echo ($place->et_google_url) ? '<a rel="nofollow" target="_blank" href="http://'.str_replace(array('http://', 'https://'), '',$place->et_google_url ) .'" >'.$place->et_google_url.'</a>' : __( 'No specify Google plus link' , ET_DOMAIN );
?>
</span>
</li>
<?php } ?>
<?php if($place->et_twitter_url){ ?>
<li>
<span class="website-place" title="<?php _e("Twitter", ET_DOMAIN); ?>">
<i class="fa fa-twitter"></i>
<?php
echo ($place->et_twitter_url) ? '<a rel="nofollow" target="_blank" href="http://'.str_replace(array('http://', 'https://'), '',$place->et_twitter_url ) .'" >'.$place->et_twitter_url.'</a>' : __( 'No specify Twitter link' , ET_DOMAIN );
?>
</span>
</li>
<?php } ?>
</ul>
</div>
<!--// place info -->
<a data-user="<?php echo $place->post_author; ?>" href="#" class="print-no contact-owner-link <?php if(is_user_logged_in()) { echo 'contact-owner'; }else { echo 'authenticate'; } ?>">
<?php _e("CONTACT OWNER", ET_DOMAIN); ?>
</a>
</div>
<div class="info-header">
<h1 class="title-place" itemprop="name" ><?php the_title(); ?></h1>
<div class="rate-wrapper">
<div itemscope itemtype="http://data-vocabulary.org/Review-aggregate">
<meta itemprop="itemreviewed" content='<?php echo $place->post_title;?>' >
<div itemprop="rating" itemscope itemtype="http://data-vocabulary.org/Rating">
<div class="rate-it rating" data-score="<?php echo $place->rating_score; ?>"></div>
<meta itemprop="average" content="<?php echo $place->rating_score; ?>">
<meta itemprop="best" content="5">
<meta itemprop="votes" content="<?php echo $place->reviews_count;?>">
<a class="number-review <?php if(is_singular()) {echo 'sroll-review' ;} ?>" href="<?php if(is_singular()) {echo '#review-list' ;} else { the_permalink();} ?>">
(<?php ($place->reviews_count > 1) ? printf(__( '%d reviews' , ET_DOMAIN ), $place->reviews_count) : printf(__( '%d review' , ET_DOMAIN ), $place->reviews_count); ?>)
</a>
</div>
</div>
<div class="clearfix"></div>
</div>
<div class="clearfix"></div>
<ul class="list-gallery">
<?php
$attachment = get_children( array(
'numberposts' => -1,
'order' => 'ASC',
'post_mime_type' => 'image',
'post_parent' => $post->ID,
'post_type' => 'attachment'
), OBJECT );
$total = count($attachment);
$i = 0;
foreach ($attachment as $key => $att) {
$image = wp_get_attachment_image_src( $att->ID, 'thumbnail' );
$image_full = wp_get_attachment_image_src( $att->ID, 'full' );
if($i < 4) {
echo '<li><a class="fancybox" title="'. get_the_title() .'" href="'. $image_full[0] .'">
<img alt="'. get_the_title() .'" src="'. $image[0] .'"></a>
</li>';
}
if($i === 4 && $total >= 5 ) {
echo '<li class="last">
<a class="fancybox" title="'. get_the_title() .'" href="'. $image_full[0] .'">
'. sprintf(__("See more %s", ET_DOMAIN), '<span class="carousel-number">' .($total-3) . '+</span>' ) .'
</a>
</li>';
}
if( $i > 4 ) {
if($total >= 5) {
echo '<li style="display:none;"><a class="fancybox" title="'. get_the_title() .'" href="'. $image_full[0] .'">
<img alt="'. get_the_title() .'" src="'. $image[0] .'"></a>
</li>';
}else {
echo '<li><a class="fancybox" title="'. get_the_title() .'" href="'. $image_full[0] .'">
<img alt="'. get_the_title() .'" src="'. $image[0] .'"></a>
</li>';
}
}
$i ++;
}
?>
</ul>
</div>
<?php the_content(); ?>
<div class="clearfix"></div>
</div>
<?php echo get_the_term_list($post, 'place_tag', '<div class="place-meta"><span class="tag-links">', '', '</span></div>' ); ?>
</div>
<div class="clearfix"></div>
</div>
以上是关于php DirectoryEngine:说明自动填充所有空白处的主要内容,如果未能解决你的问题,请参考以下文章