Advertisement
sgodar

Wikeasi Index

Apr 6th, 2012
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 4.69 KB | None | 0 0
  1. <?php
  2. /**
  3.  * Index Template
  4.  *
  5.  * Here we setup all logic and XHTML that is required for the index template, used as both the homepage
  6.  * and as a fallback template, if a more appropriate template file doesn't exist for a specific context.
  7.  *
  8.  * @package WooFramework
  9.  * @subpackage Template
  10.  */
  11.     get_header();
  12.     global $woo_options;
  13.  
  14. /**
  15.  * The Variables
  16.  *
  17.  * Setup default variables, overriding them if the "Theme Options" have been saved.
  18.  */
  19.  
  20.     $settings = array(
  21.                     'thumb_w' => 75,
  22.                     'thumb_h' => 75,
  23.                     'thumb_align' => 'alignleft',
  24.                     'enable_searchbox' => 'true',
  25.                     'enable_filterbar' => 'true'
  26.                     );
  27.  
  28.     $settings = woo_get_dynamic_values( $settings );
  29. ?>
  30.  
  31.     <div id="content" class="col-full">
  32.  
  33.         <section id="main" class="col-right">
  34.         <?php
  35.             // Load the front page search form.
  36.             if ( $settings['enable_searchbox'] == 'true' ) {
  37.                 get_template_part( 'includes/advanced-search-form' );
  38.             }
  39.  
  40.             // Load the filter bar.
  41.             if ( $settings['enable_filterbar'] == 'true' ) {
  42.                 get_template_part( 'includes/filter-bar' );
  43.             }
  44.         ?>
  45.  
  46.  
  47.                         <center>
  48.                         <script type="text/javascript"><!--
  49.                         google_ad_client = "ca-pub-0044915326038182";
  50.                         /* Leader board 728 x 90 */
  51.                         google_ad_slot = "6866417018";
  52.                         google_ad_width = 728;
  53.                         google_ad_height = 90;
  54.                         //-->
  55.                         </script>
  56.                         <script type="text/javascript"
  57.                         src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
  58.                         </script>
  59.                         </center>
  60. <br>
  61.  
  62.  
  63.         <?php if ( isset( $woo_options['woo_breadcrumbs_show'] ) && $woo_options['woo_breadcrumbs_show'] == 'true' ) { ?>
  64.             <section id="breadcrumbs">
  65.                 <?php woo_breadcrumbs(); ?>
  66.             </section><!--/#breadcrumbs -->
  67.         <?php } ?>
  68.         <?php
  69.             // To customise the query used on this template, please uncomment the code below.
  70.             /*
  71.             $paged = ( get_query_var( 'paged' ) ) ? get_query_var( 'paged' ) : 1; query_posts( array( 'post_type' => 'post', 'paged' => $paged ) );
  72.             */
  73.         ?>
  74.         <?php /* #entries DIV used in the AJAX search. */ ?>
  75.         <div id="entries">
  76.         <?php
  77.             if ( have_posts() ) { $count = 0;
  78.                 while ( have_posts() ) { the_post(); $count++;
  79.         ?>
  80.             <!-- Post Starts -->
  81.             <article <?php post_class(); ?>>
  82.  
  83.                 <?php
  84.                     $image = woo_image( 'return=true&width=' . $settings['thumb_w'] . '&height=' . $settings['thumb_h'] . '&link=img&class=thumbnail' );
  85.  
  86.                     if ( $image != '' ) {
  87.                 ?>
  88.  
  89.             <?php if ( isset( $woo_options['woo_post_content'] ) && $woo_options['woo_post_content'] != 'content' ) { ?>
  90.             <div class="drop-shadow curved curved-hz-1 <?php echo $settings['thumb_align']; ?>">
  91.                 <a title="<?php the_title(); ?>" href="<?php the_permalink(); ?>" >
  92.                     <?php echo $image; ?>
  93.                 </a>
  94.             </div><!--/.drop-shadow-->
  95.  
  96.             <?php }} ?>
  97.  
  98.                 <div class="container">
  99.  
  100.                 <header>
  101.  
  102.                     <h1 class="title"><a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a></h1>
  103.  
  104.                     <?php woo_post_meta(); ?>
  105.  
  106.                 </header>
  107.  
  108.                 <section class="entry">
  109.                     <?php if ( isset( $woo_options['woo_post_content'] ) && $woo_options['woo_post_content'] == 'content' ) { the_content( __( 'Continue Reading &rarr;', 'woothemes' ) ); } else { the_excerpt(); } ?>
  110.                 </section>
  111.  
  112.                 <div class="comments">
  113.                 <?php comments_popup_link( __( '0', 'woothemes' ), __( '1', 'woothemes' ), __( '%', 'woothemes' ) ); ?>
  114.                 </div>
  115.  
  116.                 </div><!-- /.container -->
  117.  
  118.               <div class="fix"></div>
  119.  
  120.             </article><!-- /.post -->
  121.  
  122.         <?php
  123.                 } // End WHILE Loop
  124.             } else {
  125.         ?>
  126.  
  127.             <article <?php post_class(); ?>>
  128.                 <p><?php _e( 'Sorry, no posts matched your criteria.', 'woothemes' ); ?></p>
  129.             </article><!-- /.post -->
  130.  
  131.         <?php } ?>
  132.  
  133.  
  134.         <center>
  135.         <script type="text/javascript"><!--
  136.         google_ad_client = "ca-pub-0044915326038182";
  137.         /* Leader board 728 x 90 */
  138.         google_ad_slot = "6866417018";
  139.         google_ad_width = 728;
  140.         google_ad_height = 90;
  141.         //-->
  142.         </script>
  143.         <script type="text/javascript"
  144.         src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
  145.         </script>
  146.         </center>
  147.  
  148.  
  149.         <?php if ( isset( $woo_options['woo_pagenav_show'] ) && $woo_options['woo_pagenav_show'] == 'true' ) {  woo_pagenav();  } ?>
  150.  
  151.             </div><!--/#entries-->
  152.         </section><!-- /#main -->
  153.  
  154.         <?php get_sidebar(); ?>
  155.  
  156.     </div><!-- /#content -->
  157.  
  158. <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement