HEX
Server: Apache/2.2.34 (Unix) mod_fastcgi/mod_fastcgi-SNAP-0910052141
System: Linux Kou-Etsu-Dou 4.4.59+ #25556 SMP PREEMPT Thu Mar 4 18:03:46 CST 2021 x86_64
User: hosam (1026)
PHP: 7.2.29
Disabled: NONE
Upload Files
File: /volume1/web-hua2/wp-content/themes/pixgraphy/index.php
<?php
/**
 * The main template file.
 *
 * Learn more: http://codex.wordpress.org/Template_Hierarchy
 *
 * @package Theme Freesia
 * @subpackage Pixgraphy
 * @since Pixgraphy 1.0
 */

get_header();
	$pixgraphy_settings = pixgraphy_get_theme_options();
	if($pixgraphy_settings['pixgraphy_photography_layout'] != 'photography_layout'){
	global $pixgraphy_content_layout;
	if( $post ) {
		$layout = get_post_meta( get_queried_object_id(), 'pixgraphy_sidebarlayout', true );
	}
	if( empty( $layout ) || is_archive() || is_search() || is_home() ) {
		$layout = 'default';
	}
	if( 'default' == $layout ) { //Settings from customizer
		if(($pixgraphy_settings['pixgraphy_sidebar_layout_options'] != 'nosidebar') && ($pixgraphy_settings['pixgraphy_sidebar_layout_options'] != 'fullwidth')){ ?>
			<div id="primary">
				<?php }
	}?>
				<main id="main" class="site-main clearfix">
					<?php
					$pixgraphy_stickies = get_option('sticky_posts');
					if( $pixgraphy_stickies ) {
						$pixgraphy_args = array( 'ignore_sticky_posts' => 1, 'post__not_in' => $pixgraphy_stickies, 'category__in' => $pixgraphy_settings['pixgraphy_categories'] );
						query_posts( array_merge($wp_query->query, $pixgraphy_args) );
					}
					if( have_posts() ) {
						while(have_posts() ) {
							the_post();
							get_template_part( 'content', get_post_format() );
						}
					}
					else { ?>
					<h2 class="entry-title"> <?php esc_html_e( 'No Posts Found.', 'pixgraphy' ); ?> </h2>
					<?php } ?>
					<?php get_template_part( 'pagination', 'none' ); ?>
				</main> <!-- #main -->
	<?php
	if( 'default' == $layout ) { //Settings from customizer
		if(($pixgraphy_settings['pixgraphy_sidebar_layout_options'] != 'nosidebar') && ($pixgraphy_settings['pixgraphy_sidebar_layout_options'] != 'fullwidth')): ?>
			</div> <!-- #primary -->
			<?php endif;
	}
get_sidebar();
}else{ ?>
	<!-- post_masonry ============================================= -->
<section id="post_masonry" class="<?php echo esc_attr($pixgraphy_settings['pixgraphy_column_post']);?>-column-post clearfix">
	<?php
	$pixgraphy_stickies = get_option('sticky_posts');
	if( $pixgraphy_stickies ) {
		$pixgraphy_args = array( 'ignore_sticky_posts' => 1, 'post__not_in' => $pixgraphy_stickies, 'category__in' => $pixgraphy_settings['pixgraphy_categories'] );
		query_posts( array_merge($wp_query->query, $pixgraphy_args) );
	}
	if( have_posts() ) {
		while(have_posts() ) {
			the_post();
			get_template_part( 'content');
		}
	} ?>
</section>
<?php get_template_part( 'pagination', 'none' ); ?>
<!-- end #post_masonry -->
<?php }
get_footer();