Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- get_header();
- //OptionTree Stuff
- $menuCat = ot_get_option('menu_cat');
- $logo = ot_get_option('logo');
- $homeInfo = ot_get_option('home_info');
- ?>
- <div class="section" id="cover">
- <div id="coverContent">
- <?php if($logo){ ?><a id="logo" href="<?php echo home_url(); ?>"><img src="<?php echo $logo ?>" alt="<?php bloginfo('name'); ?>" /></a><?php } ?><!--end logo-->
- <h2><?php echo get_bloginfo ( 'description' ); ?></h2>
- <?php if($homeInfo){?>
- <div id="homeInfo">
- <?php echo $homeInfo; ?>
- </div><!--end homeInfo-->
- <?php } ?>
- </div><!--end coverContent-->
- <?php if($menuCat){ ?>
- <div id="continueOn">
- <?php echo get_cat_name($menuCat).'<br />↓' ;?>
- </div><!--end continueOn-->
- <?php } ?>
- </div><!--end section-->
- <?php if($menuCat){?>
- <div id="menuStuff">
- <div id="menuNavigation">
- <ul id="menuMenu"></ul>
- </div><!--end menuNavigation-->
- <?php $args=array(
- 'orderby' => 'slug',
- 'order' => 'ASC',
- 'parent' => $menuCat
- );
- $categories=get_categories($args);
- foreach($categories as $category) {
- $catName = $category->name;
- $catName = strtolower($catName);
- $catName = str_replace (" ", "", $catName);
- $catName = str_replace ("&", "", $catName);
- $catName = str_replace ("é", "e", $catName);
- ?>
- <div class="menuSection section" id="<?php echo $catName; ?>">
- <div class="titles"><h2><?php echo $category->name; ?></h2></div>
- <?php if($category->description){ ?>
- <p class="catDescription"><?php echo $category->description; ?></p>
- <?php } ?>
- <?php $args=array(
- 'orderby' => 'slug',
- 'order' => 'ASC',
- 'parent' => $category->term_id
- );
- $subcategories=get_categories($args);
- foreach($subcategories as $subcategory) {
- $showPostsInSubCategory = new WP_Query();
- $showPostsInSubCategory->query('cat='.$subcategory->term_id.'&showposts=100');
- ?>
- <h2 class="categoryname"><?php echo $subcategory->name; ?></h2>
- <div class="sectionContent">
- <?php
- while ($showPostsInSubCategory->have_posts()) : $showPostsInSubCategory->the_post();
- $data = get_post_meta( $post->ID, 'key', true );
- ?>
- <div class="post">
- <?php if (has_post_thumbnail()) {$large_image_url = wp_get_attachment_image_src( get_post_thumbnail_id(), 'large');?>
- <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>
- <?php } if ($data[ 'price' ]) { ?>
- <h3><?php echo $data[ 'price' ]; ?></h3>
- <?php } ?>
- <h2><?php the_title(); ?></h2>
- <?php
- the_content(__(' Continue Reading','themolitor'));
- attachment_menu();
- ?>
- </div><!--end post-->
- <?php endwhile;?>
- </div><!--end sectionContent-->
- <?php
- wp_reset_postdata();
- } ?>
- </div><!--end section-->
- <?php
- wp_reset_postdata();
- } ?>
- </div><!--end menuStuff-->
- <?php }
- get_footer();
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement