Viewing File: /home/maglabs/mascotte/wp-content/themes/splendour/skins/default/templates/content-custom.php
<?php
/**
* The custom template to display the content
*
* Used for index/archive/search.
*
* @package SPLENDOUR
* @since SPLENDOUR 1.0.50
*/
$splendour_template_args = get_query_var( 'splendour_template_args' );
if ( is_array( $splendour_template_args ) ) {
$splendour_columns = empty( $splendour_template_args['columns'] ) ? 2 : max( 1, $splendour_template_args['columns'] );
$splendour_blog_style = array( $splendour_template_args['type'], $splendour_columns );
} else {
$splendour_template_args = array();
$splendour_blog_style = explode( '_', splendour_get_theme_option( 'blog_style' ) );
$splendour_columns = empty( $splendour_blog_style[1] ) ? 2 : max( 1, $splendour_blog_style[1] );
}
$splendour_blog_id = splendour_get_custom_blog_id( join( '_', $splendour_blog_style ) );
$splendour_blog_style[0] = str_replace( 'blog-custom-', '', $splendour_blog_style[0] );
$splendour_expanded = ! splendour_sidebar_present() && splendour_get_theme_option( 'expand_content' ) == 'expand';
$splendour_components = ! empty( $splendour_template_args['meta_parts'] )
? ( is_array( $splendour_template_args['meta_parts'] )
? join( ',', $splendour_template_args['meta_parts'] )
: $splendour_template_args['meta_parts']
)
: splendour_array_get_keys_by_value( splendour_get_theme_option( 'meta_parts' ) );
$splendour_post_format = get_post_format();
$splendour_post_format = empty( $splendour_post_format ) ? 'standard' : str_replace( 'post-format-', '', $splendour_post_format );
$splendour_blog_meta = splendour_get_custom_layout_meta( $splendour_blog_id );
$splendour_custom_style = ! empty( $splendour_blog_meta['scripts_required'] ) ? $splendour_blog_meta['scripts_required'] : 'none';
if ( ! empty( $splendour_template_args['slider'] ) || $splendour_columns > 1 || ! splendour_is_off( $splendour_custom_style ) ) {
?><div class="
<?php
if ( ! empty( $splendour_template_args['slider'] ) ) {
echo 'slider-slide swiper-slide';
} else {
echo esc_attr( ( splendour_is_off( $splendour_custom_style ) ? 'column' : sprintf( '%1$s_item %1$s_item', $splendour_custom_style ) ) . "-1_{$splendour_columns}" );
}
?>
">
<?php
}
?>
<article id="post-<?php the_ID(); ?>" data-post-id="<?php the_ID(); ?>"
<?php
post_class(
'post_item post_item_container post_format_' . esc_attr( $splendour_post_format )
. ' post_layout_custom post_layout_custom_' . esc_attr( $splendour_columns )
. ' post_layout_' . esc_attr( $splendour_blog_style[0] )
. ' post_layout_' . esc_attr( $splendour_blog_style[0] ) . '_' . esc_attr( $splendour_columns )
. ( ! splendour_is_off( $splendour_custom_style )
? ' post_layout_' . esc_attr( $splendour_custom_style )
. ' post_layout_' . esc_attr( $splendour_custom_style ) . '_' . esc_attr( $splendour_columns )
: ''
)
);
splendour_add_blog_animation( $splendour_template_args );
?>
>
<?php
// Sticky label
if ( is_sticky() && ! is_paged() ) {
?>
<span class="post_label label_sticky"></span>
<?php
}
// Custom layout
do_action( 'splendour_action_show_layout', $splendour_blog_id, get_the_ID() );
?>
</article><?php
if ( ! empty( $splendour_template_args['slider'] ) || $splendour_columns > 1 || ! splendour_is_off( $splendour_custom_style ) ) {
?></div><?php
// Need opening PHP-tag above just after </div>, because <div> is a inline-block element (used as column)!
}
Back to Directory
File Manager