function news_magazine_content_posts_for_home() { global $news_magazine_general_settings_page, $news_magazine_home_page, $wp_query; // initila home setings variables foreach ($news_magazine_home_page->options_homepage as $value) { if (isset($value['id'])) { if (get_theme_mod($value['id']) === FALSE) { ${$value}['var_name'] = $value['std']; } else { ${$value}['var_name'] = get_theme_mod($value['id']); } } } // initila general setings variables foreach ($news_magazine_general_settings_page->options_generalsettings as $value) { if (get_theme_mod($value['id']) === FALSE) { ${$value}['var_name'] = $value['std']; } else { ${$value}['var_name'] = get_theme_mod($value['id']); } } if (is_home()) { if (have_posts()) { while (have_posts()) { the_post(); ?> <div class="blog-post home-post blog-post-div"> <div class="blog-post blog-page"> <div class="image-block"><?php if ($grab_image && $date_enable) { echo news_magazine_posted_on_blog(); } if ($grab_image && !has_post_thumbnail()) { echo news_magazine_display_thumbnail(240, 182); } else { echo news_magazine_thumbnail(240, 182); } ?> </div> <h3> <a href="<?php the_permalink(); ?> "><?php the_title(); ?> </a> </h3> <?php if (isset($blog_style) && $blog_style == "on") { ?> <style> .blog-post .post-date + img{ height: 180px !important; width: 240px; } </style> <p> <?php news_magazine_the_excerpt_max_charlength(200); ?> </p> <a href="<?php the_permalink(); ?> " class="read_more read_blog"><?php echo __('More', 'news-magazine'); ?> </a> <?php } else { ?> <p> <?php the_content(__('More', 'news-magazine')); ?> </p> <?php } ?> <div class="clear"></div> </div> </div> <?php } if ($wp_query->max_num_pages > 2) { ?> <div class="page-navigation"> <?php news_magazine_nav_link(); ?> </div> <?php } } } else { if (is_front_page()) { if (have_posts()) { while (have_posts()) { the_post(); ?> <div class="home-post blog-post-div"> <h2 class="page-header"> <span><?php the_title(); ?> </span> </h2> <?php the_content(__('More', 'news-magazine')); ?> <div class="clear"></div> </div> <?php } ?> <div class="navigation"> <?php posts_nav_link(); ?> </div> <?php } global $post; $withcomments = true; if (comments_open()) { wp_reset_query(); ?> <div class="comments-template"> <?php echo comments_template(); ?> </div> <?php } } } }
?> <div class="post"> <?php news_magazine_entry_cont(); ?> </div> <?php } ?> <div class="navigation"> <?php news_magazine_nav_link(); ?> </div> <?php } else { ?> <p id="empty_category"><?php _e('There are not posts belonging to this category or tag. Try searching below:', 'news-magazine'); ?> </p> <form role="search" method="get" id="searchform" action="<?php echo esc_url(home_url()); ?> "> <div class="searchback">