Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
function personify_pro_get_content( $i, $int ) {
$options = personify_pro_get_theme_options();
$class = ( has_post_thumbnail() ) ? '' : 'no-post-thumbnail';
$class .= ( 1 === $int ) ? ' add-gap' : '';
$class .= ( ( $i % 3 == 0 ) && $i !== 0 && is_home() ) ? ' clear-left' : '';
$class .= ( ( $i % 2 == 0 ) && $i !== 0 && is_home() ) ? ' clear-left-responsive' : '';
$img_size = ( is_sticky() && is_home() ) ? 'full' : 'large';
?>
<article id="post-<?php the_ID(); ?>" <?php post_class( esc_attr( $class ) ); ?>>
<?php if ( has_post_thumbnail() ) : ?>
<div class="featured-image">
<a href="<?php the_permalink(); ?>">
<div class="blog-featured-image" style="background-image: url('<?php echo esc_url( get_the_post_thumbnail_url( '', $img_size ) ); ?>');"></div>
<div class="red-overlay"></div>
<?php echo personify_pro_get_svg( array( 'icon' => 'add' ) ); ?>
</a>
<?php if ( 'post' === get_post_type() && 'blog-list' == $options['archive_layout'] ) :
personify_pro_categories();
endif; ?>
</div><!-- .featured-image -->
<?php endif; ?>
<div class="entry-summary">
<div class="entry-container">
<header class="entry-header">
<?php if ( 'post' === get_post_type() && 'list' == $options['archive_layout'] ) : ?>
<div class="entry-meta">
<?php personify_pro_posted_on(); ?>
</div><!-- .entry-meta -->
<?php elseif ( 'post' === get_post_type() && 'blog-list' == $options['archive_layout'] && ! has_post_thumbnail() ) : ?>
<div class="entry-meta">
<?php personify_pro_categories(); ?>
</div><!-- .entry-meta -->
<?php endif; ?>
<h2 class="entry-title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
<?php if ( 'post' === get_post_type() && 'blog-list' == $options['archive_layout'] ) : ?>
<div class="entry-meta">
<?php personify_pro_posted_date(); ?>
</div>
<?php endif; ?>
</header>
<div class="entry-content">
<?php
the_content();
wp_link_pages( array(
'before' => '<div class="page-links">' . esc_html__( 'Pages:', 'personify-pro' ),
'after' => '</div>',
) );
?>
</div><!-- .entry-content -->
<?php if ( true === $options['show_author'] && true === $options['show_comments'] ) : ?>
<div class="entry-meta author-comments">
<?php if ( true === $options['show_author'] ) :
personify_pro_author();
endif;
personify_pro_entry_footer(); ?>
</div><!-- .entry-meta -->
<?php endif; ?>
<?php personify_pro_edit_link(); ?>
<div class="separator"></div>
</div><!-- .entry-container -->
</div><!-- .entry-summary -->
</article><!-- #post-## -->
<?php }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.