HEX
Server: nginx/1.24.0
System: Linux nowruzgan 6.8.0-57-generic #59-Ubuntu SMP PREEMPT_DYNAMIC Sat Mar 15 17:40:59 UTC 2025 x86_64
User: babak (1000)
PHP: 8.3.6
Disabled: NONE
Upload Files
File: /var/www/madomeh.com/root/wp-content/themes/kicker/index.php
<?php
/**
 * The main template file.
 *
 * This is the most generic template file in a WordPress theme
 * and one of the two required files for a theme (the other being style.css).
 * It is used to display a page when nothing more specific matches a query.
 * E.g., it puts together the home page when no home.php file exists.
 * Learn more: //codex.wordpress.org/Template_Hierarchy
 *
 * @package KICKER
 * @since KICKER 1.0
 */

$kicker_template = apply_filters( 'kicker_filter_get_template_part', kicker_blog_archive_get_template() );

if ( ! empty( $kicker_template ) && 'index' != $kicker_template ) {

	get_template_part( $kicker_template );

} else {

	kicker_storage_set( 'blog_archive', true );

	get_header();

	if ( have_posts() ) {

		// Query params
		$kicker_stickies   = is_home()
								|| ( in_array( kicker_get_theme_option( 'post_type' ), array( '', 'post' ) )
									&& (int) kicker_get_theme_option( 'parent_cat' ) == 0
									)
										? get_option( 'sticky_posts' )
										: false;
		$kicker_post_type  = kicker_get_theme_option( 'post_type' );
		$kicker_args       = array(
								'blog_style'     => kicker_get_theme_option( 'blog_style' ),
								'post_type'      => $kicker_post_type,
								'taxonomy'       => kicker_get_post_type_taxonomy( $kicker_post_type ),
								'parent_cat'     => kicker_get_theme_option( 'parent_cat' ),
								'posts_per_page' => kicker_get_theme_option( 'posts_per_page' ),
								'sticky'         => kicker_get_theme_option( 'sticky_style' ) == 'columns'
															&& is_array( $kicker_stickies )
															&& count( $kicker_stickies ) > 0
															&& get_query_var( 'paged' ) < 1
								);

		kicker_blog_archive_start();

		do_action( 'kicker_action_blog_archive_start' );

		if ( is_author() ) {
			do_action( 'kicker_action_before_page_author' );
			get_template_part( apply_filters( 'kicker_filter_get_template_part', 'templates/author-page' ) );
			do_action( 'kicker_action_after_page_author' );
		}

		if ( kicker_get_theme_option( 'show_filters' ) ) {
			do_action( 'kicker_action_before_page_filters' );
			kicker_show_filters( $kicker_args );
			do_action( 'kicker_action_after_page_filters' );
		} else {
			do_action( 'kicker_action_before_page_posts' );
			kicker_show_posts( array_merge( $kicker_args, array( 'cat' => $kicker_args['parent_cat'] ) ) );
			do_action( 'kicker_action_after_page_posts' );
		}

		do_action( 'kicker_action_blog_archive_end' );

		kicker_blog_archive_end();

	} else {

		if ( is_search() ) {
			get_template_part( apply_filters( 'kicker_filter_get_template_part', 'templates/content', 'none-search' ), 'none-search' );
		} else {
			get_template_part( apply_filters( 'kicker_filter_get_template_part', 'templates/content', 'none-archive' ), 'none-archive' );
		}
	}

	get_footer();
}