Advertisement
Guest User

Updated code but still broken

a guest
Mar 15th, 2012
485
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 5.23 KB | None | 0 0
  1. <?php get_header(); ?>
  2.  
  3. <div id="wrapper">
  4.  
  5.         <div class="sidebar">
  6.            
  7.             <nav id="options">
  8.                 <ul id="sort-by" class="option-set clearfix" data-option-key="sortBy">
  9.                     <li><a href="#sortBy=blogs" data-option-value="blogs" title="" class="c">Blogs</a></li>
  10.                     <li><a href="#sortBy=artists" data-option-value="artists" title="" class="g">Artists</a></li>
  11.                     <li><a href="#sortBy=development" data-option-value="development" title="" class="l">Development</a></li>
  12.                     <li><a href="#sortBy=projects" data-option-value="projects" title="" class="p">Projects</a></li>
  13.                     <li><a href="#sortBy=offsite" data-option-value="offsite" title="" class="y">Offsite</a></li>
  14.                     <li><a href="#sortBy=contact" data-option-value="contact" title="" class="my">Contact</a></li>
  15.                 </ul>
  16.             </nav>
  17.            
  18.             <div id="newsletter-wrap">
  19.                 <p>Subscribe</p>
  20.                 <form id="subscribe" action="" method="">
  21.                     <input type="text" name="name" value="" id="name" placeholder="Name" required />
  22.                     <input type="email" name="email" value="" id="email" placeholder="Email" required />
  23.                 </form>
  24.             </div>
  25.            
  26.             <footer>
  27.                 <?php
  28.                 $pageintro=get_post_meta($post->ID,'Page_Intro',true);
  29.                 if($pageintro != '') {
  30.                 echo '<p>'. $pageintro .'</p>';
  31.                 } else {
  32.                 echo ' ';
  33.                 }
  34.                 ?>
  35.                 <?php
  36.                 $pageintroref=get_post_meta($post->ID,'Page_Intro_Ref',true);
  37.                 if($pageintroref != '') {
  38.                 echo '<p>'. $pageintroref .'</p>';
  39.                 } else {
  40.                 echo ' ';
  41.                 }
  42.                 ?>
  43.             </footer>
  44.            
  45.         </div> <!--! /sidebar -->
  46.        
  47.         <div id="main" role="main">
  48.                        
  49.                 <?php
  50.                 // Query just the category static and make the link manually editable through the 'URL' custom field
  51.                 $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
  52.                 $args= array(
  53.                     'category_name' => 'static',
  54.                     'paged' => $paged
  55.                 );
  56.                 query_posts($args);
  57.                 if( have_posts() ) :?>
  58.                
  59.                 <?php while (have_posts()) : the_post(); ?>
  60.                    
  61.                   <?php foreach( get_the_category() as $cat ) echo '<div class="module ' . $cat->slug . '" data-category="' . $cat->slug . '" >'; ?>
  62.                                
  63.                       <a href="<?php echo get_post_meta($post->ID, 'URL', true); ?>" title="<?php the_title(); ?>">
  64.                       <!-- IF POST ID = x, DISPLAY HARD CODED FLICKR SLIDESHOW ELSE DISPLAY NORMALLY -->
  65.                       <div class="active">
  66.                             <div class="hover"></div>
  67.                             <?php the_post_thumbnail(); ?>
  68.                       </div>
  69.                      
  70.                       <!-- im trying to put your code in here but it just won't work -->
  71.                       <h1><?php the_title(); ?></h1>
  72.                       <?php
  73.                       // Call in the contents of a custom field called Excerpt and if custom field in admin panel is empty don't display <p> tags otherwise wrap contents in <p> tags
  74.                       $excerpt=get_post_meta($post->ID,'Excerpt',true);
  75.                       if($excerpt != '') {
  76.                       echo '<p>'. $excerpt .'</p>';
  77.                       } else {
  78.                       echo ' ';
  79.                       }
  80.                       ?>
  81.                       <p class="date"><!-- for sorting boxes, use post id or date format must be yyyyMMdd--><?php the_time('Ydm') ?></p>
  82.                      </a>
  83.                 </div>
  84.                                
  85.                 <?php endwhile; ?>
  86.                 <?php endif; ?>
  87.        
  88.        
  89.                
  90.                 <?php
  91.                 // Query all other categories and display them the normal way
  92.                 $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
  93.                 $args= array(
  94.                     'category_name' => 'blogs, artists, development, projects, offsite, contact',
  95.                     'paged' => $paged
  96.                 );
  97.                 query_posts($args);
  98.                 if( have_posts() ) :?>
  99.                
  100.                     <?php while (have_posts()) : the_post(); ?>
  101.                  
  102.                   <!-- if sticky post or is category slug static then display a different box than the rest (i.e. no link and make h1 tag link to match the url entered in custom field) Need to control where the sticky post is originally displayed on page -->
  103.                  
  104.                    
  105.                   <?php foreach( get_the_category() as $cat ) echo '<div class="module ' . $cat->slug . '" data-category="' . $cat->slug . '" >'; ?>
  106.                                
  107.                   <a href="<?php the_permalink()?>" title="<?php the_title(); ?>">
  108.                       <div class="active">
  109.                             <div class="hover"></div>
  110.                             <?php the_post_thumbnail(); ?>
  111.                       </div>
  112.                      
  113.                       <!-- im trying to put your code in here but it just won't work -->
  114.                       <h1><?php the_title(); ?> <span>/ Explode here</span></h1>
  115.                       <?php
  116.                       // Call in the contents of a custom field called Excerpt and if custom field in admin panel is empty don't display <p> tags otherwise wrap contents in <p> tags
  117.                       $excerpt=get_post_meta($post->ID,'Excerpt',true);
  118.                       if($excerpt != '') {
  119.                       echo '<p>'. $excerpt .'</p>';
  120.                       } else {
  121.                       echo ' ';
  122.                       }
  123.                       ?>
  124.                       <p class="date"><!-- for sorting boxes, use post id or date format must be yyyyMMdd--><?php the_time('Ydm') ?></p>
  125.                   </a>
  126.                 </div>
  127.                                
  128.                 <?php endwhile; ?>
  129.                 <?php endif; ?>
  130.                
  131.                
  132.                
  133.                
  134.                
  135.                
  136.                            
  137.         </div> <!--! /main -->
  138.  
  139. <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement