Advertisement
SRD75

updated index.php

Jun 16th, 2013
237
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 3.04 KB | None | 0 0
  1. <?php
  2. get_header();
  3.  
  4. //OptionTree Stuff
  5. $menuCat = ot_get_option('menu_cat');
  6. $logo = ot_get_option('logo');
  7. $homeInfo = ot_get_option('home_info');
  8. ?>
  9.  
  10. <div class="section" id="cover">
  11.     <div id="coverContent">
  12.         <?php if($logo){ ?><a id="logo" href="<?php echo home_url(); ?>"><img src="<?php echo $logo ?>" alt="<?php bloginfo('name'); ?>" /></a><?php } ?><!--end logo-->
  13.         <h2><?php echo get_bloginfo ( 'description' );  ?></h2>
  14.         <?php if($homeInfo){?>
  15.         <div id="homeInfo">
  16.             <?php echo $homeInfo; ?>
  17.         </div><!--end homeInfo-->
  18.         <?php } ?>
  19.     </div><!--end coverContent-->
  20.  
  21.     <?php if($menuCat){ ?>
  22.     <div id="continueOn">
  23.         <?php echo get_cat_name($menuCat).'<br />&darr;' ;?>
  24.     </div><!--end continueOn-->
  25.     <?php } ?>
  26.    
  27. </div><!--end section-->
  28.  
  29. <?php if($menuCat){?>
  30. <div id="menuStuff">
  31.  
  32. <div id="menuNavigation">
  33.     <ul id="menuMenu"></ul>
  34. </div><!--end menuNavigation-->
  35.  
  36.     <?php $args=array(
  37.     'orderby' => 'slug',
  38.     'order' => 'ASC',
  39.     'include' => '4, 5, 6, 27',
  40.     //'exclude' => '3, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26',
  41.     'child_of' => $menuCat
  42.     );
  43.     $categories=get_categories($args);
  44.     foreach($categories as $category) {
  45.         $catName = $category->name;
  46.         $catName = strtolower($catName);
  47.         $catName = str_replace (" ", "", $catName);
  48.         $catName = str_replace ("&amp;", "", $catName);
  49.         $catName = str_replace ("é", "e", $catName);
  50.     ?>
  51.     <div class="menuSection section" id="<?php echo $catName; ?>">
  52.         <div class="titles"><h2><?php echo $category->name; ?></h2></div>
  53.         <?php if($category->description){ ?>
  54.             <p class="catDescription"><?php echo $category->description; ?></p>
  55.         <?php } ?>
  56.    
  57.         <?php $args=array(
  58.         'orderby' => 'slug',
  59.         'order' => 'ASC',
  60.         'parent' => $category->term_id
  61.         );
  62.         $subcategories=get_categories($args);
  63.         foreach($subcategories as $subcategory) {
  64.  
  65.             $showPostsInSubCategory = new WP_Query();
  66.             $showPostsInSubCategory->query('cat='.$subcategory->term_id.'&showposts=100');
  67.         ?>
  68.         <h2 class="categoryname"><?php echo $subcategory->name; ?></h2>
  69.         <div class="sectionContent">
  70.        
  71.         <?php
  72.             while ($showPostsInSubCategory->have_posts()) : $showPostsInSubCategory->the_post();
  73.             $data = get_post_meta( $post->ID, 'key', true );
  74.         ?>
  75.             <div class="post">
  76.             <?php if (has_post_thumbnail()) {$large_image_url = wp_get_attachment_image_src( get_post_thumbnail_id(), 'large');?>
  77.                 <a class="picIcon" title="<?php the_title(); ?>" rel="prettyPhoto[gallery<?php the_id(); ?>]"  href="<?php echo $large_image_url[0]; ?>" title="<?php the_title_attribute(); ?>"></a>
  78.                 <?php } if ($data[ 'price' ]) { ?>
  79.                 <h3><?php echo $data[ 'price' ]; ?></h3>
  80.                 <?php } ?>
  81.                 <h2><?php the_title(); ?></h2>
  82.                 <?php
  83.                     the_content(__(' Continue Reading','themolitor'));
  84.                     attachment_menu();
  85.                 ?>
  86.             </div><!--end post-->
  87.             <?php endwhile;?>
  88.         </div><!--end sectionContent-->
  89.         <?php
  90.         wp_reset_postdata();
  91.         } ?>
  92.     </div><!--end section-->
  93.     <?php
  94.     wp_reset_postdata();
  95.     } ?>
  96. </div><!--end menuStuff-->
  97. <?php }
  98. get_footer();
  99. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement