' . __( 'Admin notice for:', 'avia_framework' ) . '
';
$msg .= __( 'Blog Posts', 'avia_framework' ) . '
';
$msg .= __( 'This element was disabled in your theme settings. You can activate it here:', 'avia_framework' ) . '
';
$msg .= '' . __( 'Performance Settings', 'avia_framework' ) . '';
$content = "{$msg}";
echo $content;
}
return;
}
$initial_id = avia_get_the_ID();
// check if we got posts to display:
if( have_posts() ) :
while( have_posts() ) : the_post();
/*
* get the current post id, the current post class and current post format
*/
$url = '';
$current_post = array();
$current_post['post_loop_count'] = $post_loop_count;
$current_post['the_id'] = get_the_ID();
$current_post['parity'] = $post_loop_count % 2 ? 'odd' : 'even';
$current_post['last'] = count( $wp_query->posts ) == $post_loop_count ? ' post-entry-last ' : '';
$current_post['post_type'] = get_post_type( $current_post['the_id'] );
$current_post['post_class'] = 'post-entry-' . $current_post['the_id'] . ' post-loop-' . $post_loop_count . ' post-parity-' . $current_post['parity'] . $current_post['last'] . ' ' . $blog_style;
$current_post['post_class'] .= ( $current_post['post_type'] == 'post' ) ? '' : ' post';
$current_post['post_format'] = get_post_format() ? get_post_format() : 'standard';
$current_post['post_layout'] = avia_layout_class('main', false);
$blog_content = ! empty( $avia_config['blog_content'] ) ? $avia_config['blog_content'] : 'content';
/*If post uses builder change content to exerpt on overview pages*/
if( Avia_Builder()->get_alb_builder_status( $current_post['the_id'] ) && !is_singular($current_post['the_id']) && $current_post['post_type'] == 'post')
{
$current_post['post_format'] = 'standard';
$blog_content = 'excerpt_read_more';
}
/**
* Allows especially for ALB posts to change output to 'content'
* Supported since 4.5.5
*
* @since 4.5.5
* @return string
*/
$blog_content = apply_filters( 'avf_blog_content_in_loop', $blog_content, $current_post, $blog_style, $blog_global_style );
/*
* retrieve slider, title and content for this post,...
*/
$size = strpos( $blog_style, 'big' ) ? ( ( strpos($current_post['post_layout'], 'sidebar') !== false ) ? 'entry_with_sidebar' : 'entry_without_sidebar' ) : 'square';
if( ! empty( $avia_config['preview_mode'] ) && ! empty( $avia_config['image_size'] ) && $avia_config['preview_mode'] == 'custom' )
{
$size = $avia_config['image_size'];
}
/**
* @since 4.5.4
* @return string
*/
$current_post['slider'] = apply_filters( 'avf_post_featured_image_link', get_the_post_thumbnail( $current_post['the_id'], $size ), $current_post, $size );
/**
* Backwards comp. to checkbox prior v4.5.3 (now selectbox with '' or '1')
*/
$hide_featured_image = empty( get_post_meta( $current_post['the_id'], '_avia_hide_featured_image', true ) ) ? false : true;
if( is_single( $initial_id ) && $hide_featured_image )
{
$current_post['slider'] = '';
}
$current_post['title'] = get_the_title();
/**
* Allow 3rd party to hook and return a plugin specific content.
* This returned content replaces Enfold's standard content building procedure.
*
* @since 4.5.7.2
* @param string
* @param string $context
* @return string
*/
$current_post['content'] = apply_filters( 'avf_the_content', '', 'loop_index' );
if( '' == $current_post['content'] )
{
$current_post['content'] = $blog_content == 'content' ? get_the_content(__('Read more','avia_framework').'') : get_the_excerpt();
$current_post['content'] = $blog_content == 'excerpt_read_more' ? $current_post['content'].'
'entry_content' ) ); ?>>