Advertisement
SRD75

original index.php

Jun 14th, 2013
359
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.64 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.   'child_of' => $menuCat
  40. );
  41. $categories=get_categories($args);
  42. foreach($categories as $category) {
  43.  
  44. $catName = $category->name;
  45. $catName = strtolower($catName);
  46. $catName = str_replace (" ", "", $catName);
  47. $catName = str_replace ("&amp;", "", $catName);
  48. $catName = str_replace ("é", "e", $catName);
  49.  
  50. $showPostsInCategory = new WP_Query();
  51. $showPostsInCategory->query('cat='.$category->term_id.'&showposts=100');
  52. if ($showPostsInCategory->have_posts()) :?>
  53.  
  54. <div class="menuSection section" id="<?php echo $catName; ?>">
  55.    
  56.     <div class="titles"><h2><?php echo $category->name; ?></h2></div>
  57.     <?php if($category->description){ ?>
  58.     <p class="catDescription"><?php echo $category->description; ?></p>
  59.     <?php } ?>
  60.     <div class="sectionContent">
  61.     <?php
  62.     while ($showPostsInCategory->have_posts()) : $showPostsInCategory->the_post();
  63.     $data = get_post_meta( $post->ID, 'key', true );
  64.     ?>
  65.         <div class="post">
  66.         <?php if (has_post_thumbnail()) {$large_image_url = wp_get_attachment_image_src( get_post_thumbnail_id(), 'large');?>
  67.         <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>
  68.         <?php } if ($data[ 'price' ]) { ?>
  69.         <h3><?php echo $data[ 'price' ]; ?></h3>
  70.         <?php } ?>
  71.         <h2><?php the_title(); ?></h2>
  72.         <?php
  73.         the_content(__(' Continue Reading','themolitor'));
  74.         attachment_menu();
  75.         ?>
  76.         </div><!--end post-->
  77.     <?php endwhile;?>
  78.     </div><!--end sectionContent-->
  79. </div><!--end section-->
  80. <?php
  81. endif;
  82. wp_reset_postdata();
  83. } ?>
  84. </div><!--end menuStuff-->
  85. <?php }
  86. get_footer();
  87. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement