Skip to content

Instantly share code, notes, and snippets.

@egorvinogradov
Created January 23, 2016 21:39
Show Gist options
  • Save egorvinogradov/79166723efea23c0f2fe to your computer and use it in GitHub Desktop.
Save egorvinogradov/79166723efea23c0f2fe to your computer and use it in GitHub Desktop.
<?php
/**
* @package Resonar
* @since Resonar 1.0
*/
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<?php
if ( has_post_thumbnail() && ! post_password_required() ) :
$featuredimage = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'resonar-large' );
?>
<div class="entry-header-background" style="background-image:url(<?php echo esc_url( $featuredimage[0] ); ?>)">
<div class="entry-header-wrapper">
<header id="entry-header" class="entry-header">
<div class="entry-header-inner">
<?php
/*
<div class="entry-date">
<?php resonar_entry_date(); ?>
</div>
*/
?>
<?php the_title( '<h1 class="entry-title">', '</h1>' ); ?>
</div>
<div class="scroll-indicator-wrapper">
<a href="#" id="scroll-indicator" class="scroll-indicator"><span class="screen-reader-text"><?php _e( 'Scroll down to see more content', 'resonar' );?></span></a>
</div>
</header>
</div>
</div>
<?php else : ?>
<header class="entry-header">
<div class="entry-header-inner">
<?php
/*
<div class="entry-date">
<?php resonar_entry_date(); ?>
</div>
*/
?>
<?php the_title( '<h1 class="entry-title">', '</h1>' ); ?>
</div>
</header>
<?php endif; ?>
<div class="entry-content-footer">
<div class="entry-content">
<?php
$locale_data = localize_school_page(get_post_custom($ID), ICL_LANGUAGE_CODE);
if ($locale_data['is_school_page']) {
// if ($locale_data['photo_gallery_code']) {
// echo do_shortcode($locale_data['photo_gallery_code']);
// }
//echo '<h3>' . $locale_data['labels']['select_program_and_dates'] . '</h3>';
// foreach ($locale_data['programs'] as $program) {
// echo '<b>' . $program['name'] . '</b> — $' . $program['price'] . '<br>';
// }
echo '<hr>';
// foreach ($locale_data['available_features'] as $feature) {
// echo '<b>' . $feature['title'] . '</b> — ' . $feature['caption'] . '<br>';
// }
echo '<hr>';
//echo $locale_data['labels']['rating'] . ': ' . $locale_data['rating'] . '<br>';
//echo '<a href="' . $locale_data['website'] . '" target="_blank">' . $locale_data['website'] . '</a><br>';
echo '<hr><br>';
}
?>
<!-- City -->
<?php
$categories = get_the_category();
if ( ! empty( $categories ) ) {
foreach( $categories as $category ) {
echo '<a href="' . esc_url( get_category_link( $category->term_id ) ) . '">' . esc_html( $category->name ) . '</a>';
}
}
?>
<!-- Rating -->
<?php $locale_data['labels']['rating'] ?>:
<i>
<?php $locale_data['rating']; ?>
</i>
<!-- Photo Gallery -->
<?php if ($locale_data['photo_gallery_code']) {
echo do_shortcode($locale_data['photo_gallery_code']);
} ?>
<!-- Programs and Prices -->
<h3>
<?php $locale_data['labels']['select_program_and_dates'] ?>
</h3>
<ul>
<?php foreach ($locale_data['programs'] as $program) { ?>
<li>
<?php $program['name'] ?> — $<?php $program['price'] ?>
</li>
<?php } ?>
</ul>
<!-- Available Features -->
<?php foreach ($locale_data['available_features'] as $feature) { ?>
<p>
<b><?php $feature['title'] ?></b><br>
<?php $feature['caption'] ?>
</p>
<?php } ?>
<!-- Content -->
<?php the_content(); ?>
<!-- Google Map -->
<?php if ($locale_data['address']) { ?>
<iframe width="100%" height="450" frameborder="0" style="border:0" src="https://www.google.com/maps/embed/v1/place?key=AIzaSyClK7rlPaca6dwmn_pZsvn8u_jXCC4YLq8
&q=<?php echo $locale_data['address']; ?>" allowfullscreen>
</iframe>
<?php } ?>
<!-- Booking Form -->
<?php echo do_shortcode('[contact-form-7 id="102"]'); ?>
<!-- ################ -->
<?php
wp_link_pages( array(
'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'resonar' ) . '</span>',
'after' => '</div>',
'link_before' => '<span>',
'link_after' => '</span>',
'pagelink' => '<span class="screen-reader-text">' . __( 'Page', 'resonar' ) . ' </span>%',
'separator' => '<span class="screen-reader-text">, </span>',
) );
?>
</div><!-- .entry-content -->
<footer class="entry-footer">
<?php /* get_template_part( 'author-bio' ); */ ?>
<?php resonar_entry_meta(); ?>
<?php edit_post_link( __( 'Edit', 'resonar' ), '<span class="edit-link">', '</span>' ); ?>
</footer><!-- .entry-footer -->
</div>
</article><!-- #post-## -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment