Created
October 13, 2020 19:07
-
-
Save moeller79/6b7b4bbef2964f8e6d34eba54098419e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* The template for displaying single posts. | |
* | |
* @package GeneratePress | |
*/ | |
if ( ! defined( 'ABSPATH' ) ) { | |
exit; // Exit if accessed directly. | |
} | |
?> | |
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?> <?php generate_do_microdata( 'article' ); ?>> | |
<div class="inside-article"> | |
<?php | |
/** | |
* generate_before_content hook. | |
* | |
* @since 0.1 | |
* | |
* @hooked generate_featured_page_header_inside_single - 10 | |
*/ | |
do_action( 'generate_before_content' ); | |
?> | |
<header class="entry-header"> | |
<?php | |
/** | |
* generate_before_entry_title hook. | |
* | |
* @since 0.1 | |
*/ | |
do_action( 'generate_before_entry_title' ); | |
if ( generate_show_title() ) { | |
the_title( '<h1 class="entry-title" itemprop="headline">', '</h1>' ); | |
} | |
/** | |
* generate_after_entry_title hook. | |
* | |
* @since 0.1 | |
* | |
* @hooked generate_post_meta - 10 | |
*/ | |
do_action( 'generate_after_entry_title' ); | |
?> | |
</header><!-- .entry-header --> | |
<?php | |
/** | |
* generate_after_entry_header hook. | |
* | |
* @since 0.1 | |
* | |
* @hooked generate_post_image - 10 | |
*/ | |
do_action( 'generate_after_entry_header' ); | |
?> | |
<!-- STARTS Review Post Template - Integrated with ACF --> | |
<?php if ( $image = get_field('review_featured_image') ): ?> | |
<div class="grid-40 tablet-grid-50 mobile-grid-100 first-column"> | |
<div class="review-featured-image"> | |
<img src="<?php echo $image['url']; ?>" alt="<?php echo $image['alt']; ?>" /> | |
</div> | |
</div> | |
<?php endif; ?> | |
<?php if( get_field('review_post_title') ): ?> | |
<div class="grid-60 tablet-grid-50 mobile-grid-100 second-column"> | |
<div class="review_post_title"> | |
<h3><?php the_field('review_post_title'); ?></h3> | |
</div> | |
<?php if( get_field('review_rating') ): ?> | |
<div class="review_rating"> | |
<?php the_field('review_rating'); ?><br> | |
</div> | |
<?php endif; ?> | |
<?php if( get_field('review_description') ): ?> | |
<div class="review_description"> | |
<?php the_field('review_description'); ?> | |
</div> | |
<?php endif; ?> | |
<?php | |
$review_link = get_field('review_join_button'); | |
if( $review_link ): | |
$review_link_url = $review_link['url']; | |
$review_link_title = $review_link['title']; | |
$review_link_target = $review_link['target'] ? $review_link['target'] : '_self'; | |
?> | |
<div class="review_join_button"> | |
<a class="custom-join-button" href="<?php echo esc_url( $review_link_url ); ?>" target="<?php echo esc_attr( $review_link_target ); ?>"><?php echo esc_html( $review_link_title ); ?></a> | |
</div> | |
<?php endif; ?> | |
</div> | |
<?php endif; ?> | |
<!-- ENDS Review Post Template - Integrated with ACF --> | |
<div class="entry-content" itemprop="text"> | |
<?php | |
the_content(); | |
wp_link_pages( array( | |
'before' => '<div class="page-links">' . __( 'Pages:', 'generatepress' ), | |
'after' => '</div>', | |
) ); | |
?> | |
</div><!-- .entry-content --> | |
<!-- Top Posts Template - Integrated with ACF --> | |
<?php if( have_rows('top_posts') ): ?> | |
<?php while ( have_rows('top_posts') ) : the_row(); ?> | |
<div class="top_post_title"> | |
<h3><?php the_sub_field('top_post_title'); ?></h3> | |
</div> | |
<div class="top_post_payment_details_thumbnail_short_summary desktop-and-tablets-only"> | |
<?php $image = get_sub_field('top_post_thumbnail'); ?> | |
<img class="top_post_thumbnail_desktop_tablet" src="<?php echo $image['url']; ?>" alt="<?php echo $image['alt']; ?>" /> | |
<div class="top_post_payment_details"> | |
<?php the_sub_field('top_post_payment_details'); ?> | |
</div> | |
</div> | |
<div class="top_post_join_button"> | |
<?php | |
$top_post_link = get_sub_field('top_post_join_button'); | |
if( $top_post_link ): | |
$top_post_link_url = $top_post_link['url']; | |
$top_post_link_title = $top_post_link['title']; | |
$top_post_link_target = $top_post_link['target'] ? $top_post_link['target'] : '_self'; | |
?> | |
<a class="custom-join-button" href="<?php echo esc_url( $top_post_link_url ); ?>" target="<?php echo esc_attr( $top_post_link_target ); ?>"><?php echo esc_html( $top_post_link_title ); ?></a> | |
<?php endif; ?> | |
</div> | |
<?php endwhile; ?> | |
<?php endif; ?> | |
<!-- Content Below Top Posts - Integrated with ACF --> | |
<?php if( get_field('content_below_top_posts') ): ?> | |
<div class="content_below_top_posts"> | |
<?php the_field('content_below_top_posts'); ?> | |
</div> | |
<?php endif; ?> | |
<!-- STARTS Social Warfare --> | |
<?php | |
if( function_exists( 'social_warfare' ) ) { | |
social_warfare(); | |
} ?> | |
<!-- ENDS Social Warfare --> | |
<?php | |
/** | |
* generate_after_entry_content hook. | |
* | |
* @since 0.1 | |
* | |
* @hooked generate_footer_meta - 10 | |
*/ | |
do_action( 'generate_after_entry_content' ); | |
/** | |
* generate_after_content hook. | |
* | |
* @since 0.1 | |
*/ | |
do_action( 'generate_after_content' ); | |
?> | |
</div><!-- .inside-article --> | |
</article><!-- #post-## --> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment