| Linux webm007.cluster106.gra.hosting.ovh.net 5.15.167-ovh-vps-grsec-zfs-classid #1 SMP Tue Sep 17 08:14:20 UTC 2024 x86_64 Path : /home/eglisebaa/www/wp-content/themes/hallelujah/ |
| Current File : /home/eglisebaa/www/wp-content/themes/hallelujah/index-custom.php |
<?php
/**
* The template for homepage posts with custom style
*
* @package WordPress
* @subpackage HALLELUJAH
* @since HALLELUJAH 1.0.50
*/
hallelujah_storage_set( 'blog_archive', true );
get_header();
if ( have_posts() ) {
$hallelujah_blog_style = hallelujah_get_theme_option( 'blog_style' );
$hallelujah_parts = explode( '_', $hallelujah_blog_style );
$hallelujah_columns = ! empty( $hallelujah_parts[1] ) ? max( 1, min( 6, (int) $hallelujah_parts[1] ) ) : 1;
$hallelujah_blog_id = hallelujah_get_custom_blog_id( $hallelujah_blog_style );
$hallelujah_blog_meta = hallelujah_get_custom_layout_meta( $hallelujah_blog_id );
if ( ! empty( $hallelujah_blog_meta['margin'] ) ) {
hallelujah_add_inline_css( sprintf( '.page_content_wrap{padding-top:%s}', esc_attr( hallelujah_prepare_css_value( $hallelujah_blog_meta['margin'] ) ) ) );
}
$hallelujah_custom_style = ! empty( $hallelujah_blog_meta['scripts_required'] ) ? $hallelujah_blog_meta['scripts_required'] : 'none';
hallelujah_blog_archive_start();
$hallelujah_classes = 'posts_container blog_custom_wrap'
. ( ! hallelujah_is_off( $hallelujah_custom_style )
? sprintf( ' %s_wrap', $hallelujah_custom_style )
: ( $hallelujah_columns > 1
? ' columns_wrap columns_padding_bottom'
: ''
)
);
$hallelujah_stickies = is_home() ? get_option( 'sticky_posts' ) : false;
$hallelujah_sticky_out = hallelujah_get_theme_option( 'sticky_style' ) == 'columns'
&& is_array( $hallelujah_stickies ) && count( $hallelujah_stickies ) > 0 && get_query_var( 'paged' ) < 1;
if ( $hallelujah_sticky_out ) {
?>
<div class="sticky_wrap columns_wrap">
<?php
}
if ( ! $hallelujah_sticky_out ) {
if ( hallelujah_get_theme_option( 'first_post_large' ) && ! is_paged() && ! in_array( hallelujah_get_theme_option( 'body_style' ), array( 'fullwide', 'fullscreen' ) ) ) {
the_post();
get_template_part( apply_filters( 'hallelujah_filter_get_template_part', 'content', 'excerpt' ), 'excerpt' );
}
?>
<div class="<?php echo esc_attr( $hallelujah_classes ); ?>">
<?php
}
while ( have_posts() ) {
the_post();
if ( $hallelujah_sticky_out && ! is_sticky() ) {
$hallelujah_sticky_out = false;
?>
</div><div class="<?php echo esc_attr( $hallelujah_classes ); ?>">
<?php
}
$hallelujah_part = $hallelujah_sticky_out && is_sticky() ? 'sticky' : 'custom';
get_template_part( apply_filters( 'hallelujah_filter_get_template_part', 'content', $hallelujah_part ), $hallelujah_part );
}
?>
</div>
<?php
hallelujah_show_pagination();
hallelujah_blog_archive_end();
} else {
if ( is_search() ) {
get_template_part( apply_filters( 'hallelujah_filter_get_template_part', 'content', 'none-search' ), 'none-search' );
} else {
get_template_part( apply_filters( 'hallelujah_filter_get_template_part', 'content', 'none-archive' ), 'none-archive' );
}
}
get_footer();