1. <?php global $theme; get_header(); ?>
  2.  
  3.  
  4.  
  5.  
  6.  
  7. <div id="main">
  8.  
  9.  
  10.  
  11.  
  12.  
  13. <?php $theme->hook('main_before'); ?>
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21. <div id="content">
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43. <?php query_posts('cat=6&showposts=1'); ?>
  44.  
  45.  
  46. <?php if (have_posts()) : ?>
  47.  
  48. <?php $count = 0; ?>
  49.  
  50.  
  51.  
  52. <?php while (have_posts()) : the_post(); ?>
  53.  
  54. <?php $count++; ?>
  55.  
  56.  
  57.  
  58. <?php if ($count <= 1) : ?>
  59.  
  60.  
  61.  
  62. <h1 class="title">
  63. Latest Self Improvement Article
  64. </h1>
  65.  
  66. <h2 class="page-title"></h2>
  67.  
  68.  
  69. <h2 class="title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'themater' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
  70.  
  71.  
  72.  
  73.  
  74.  
  75. <div class="entry clearfix">
  76.  
  77.  
  78.  
  79. <?php
  80.  
  81. if(has_post_thumbnail()) {
  82.  
  83. the_post_thumbnail(
  84.  
  85. array($theme->get_option('featured_image_width_single'), $theme->get_option('featured_image_height_single')),
  86.  
  87. array("class" => $theme->get_option('featured_image_position_single') . " featured_image2")
  88.  
  89. );
  90.  
  91. }
  92.  
  93. ?>
  94.  
  95.  
  96.  
  97.  
  98. <?php
  99. the_content('');
  100. wp_link_pages( array( 'before' => '<p><strong>' . __( 'Pages:', 'themater' ) . '</strong>', 'after' => '</p>' ) );
  101. ?>
  102.  
  103.  
  104.  
  105. <a href="<?php the_permalink(); ?>" title="Read More <?php the_title(); ?>" class="more-link">Read More ยป</a>
  106.  
  107.  
  108.  
  109.  
  110.  
  111. </div>
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119. <?php else : ?>
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127. <?php endif; ?>
  128.  
  129.  
  130.  
  131.  
  132.  
  133. <?php endwhile; ?>
  134.  
  135.  
  136.  
  137. <?php endif; ?>
  138.  
  139.  
  140.  
  141.  
  142.  
  143.  
  144.  
  145.  
  146.  
  147.  
  148.  
  149.  
  150.  
  151.  
  152.  
  153.  
  154.  
  155.  
  156.  
  157.  
  158.  
  159. <h2 class="page-title"></h2>
  160.  
  161.  
  162.  
  163. <?php $theme->hook('content_before'); ?>
  164.  
  165.  
  166.  
  167.  
  168. <?php $latest = get_posts('cat=6&posts_per_page=1');
  169. query_posts( array( 'cat' => 6, 'posts_per_page' => 2, 'paged' => get_query_var('page'), 'post__not_in' => array( $latest[0]->ID ) ) ); ?>
  170.  
  171.  
  172.  
  173. <?php
  174.  
  175. $is_post_wrap = 0;
  176.  
  177. if (have_posts()) : while (have_posts()) : the_post();
  178.  
  179. /**
  180.  
  181. * The default post formatting from the post.php template file will be used.
  182.  
  183. * If you want to customize the post formatting for your homepage:
  184.  
  185. *
  186.  
  187. * - Create a new file: post-homepage.php
  188.  
  189. * - Copy/Paste the content of post.php to post-homepage.php
  190.  
  191. * - Edit and customize the post-homepage.php file for your needs.
  192.  
  193. *
  194.  
  195. * Learn more about the get_template_part() function: http://codex.wordpress.org/Function_Reference/get_template_part
  196.  
  197. */
  198.  
  199.  
  200.  
  201. $is_post_wrap++;
  202.  
  203. if($is_post_wrap == '1') {
  204.  
  205. ?><div class="post-wrap clearfix"><?php
  206.  
  207. }
  208.  
  209. get_template_part('post', 'homepage');
  210.  
  211.  
  212.  
  213. if($is_post_wrap == '2') {
  214.  
  215. $is_post_wrap = 0;
  216.  
  217. ?></div>
  218.  
  219. <a
  220. href="http://selfexceed.com/category/blog/"><img
  221. style="border: 0px solid ; width: 327px; height: 160px;" alt="self improvement blog"
  222. src="http://selfexceed.com/wp-content/uploads/2012/12/Blog.png"></a><a
  223. href="http://selfexceed.com/category/videos/"><img
  224. style="border: 0px solid ; width: 327px; height: 160px;" alt="self improvement videos"
  225. src="http://selfexceed.com/wp-content/uploads/2012/12/Video.png"></a>
  226.  
  227.  
  228.  
  229. <?php
  230.  
  231. }
  232.  
  233.  
  234.  
  235. endwhile;
  236.  
  237.  
  238.  
  239. else :
  240.  
  241. get_template_part('post', 'noresults');
  242.  
  243. endif;
  244.  
  245.  
  246.  
  247. if($is_post_wrap == '1') {
  248.  
  249. ?></div><?php
  250.  
  251. }
  252.  
  253.  
  254.  
  255. get_template_part('navigation');
  256.  
  257. ?>
  258.  
  259.  
  260.  
  261. <?php $theme->hook('content_after'); ?>
  262.  
  263.  
  264.  
  265.  
  266. </div><!-- #content -->
  267.  
  268.  
  269.  
  270. <?php get_sidebars(); ?>
  271.  
  272.  
  273.  
  274. <?php $theme->hook('main_after'); ?>
  275.  
  276.  
  277.  
  278. </div><!-- #main -->
  279.  
  280.  
  281.  
  282. <?php get_footer(); ?>