SHARE
TWEET

single template

a guest Jan 8th, 2014 144 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. /* Template Name: Pod Page Single Template */
  3. get_header(); ?>
  4.  
  5.  
  6.  
  7.  
  8. <div class="section group">
  9.  
  10. <?php get_sidebar(); ?>
  11.  
  12.  
  13.        
  14.        
  15.         <!--Top banner-->
  16.         <div class="col span_6_of_8 top_banner">
  17.        
  18.                 <h2 class="strapline">Over 40 years servicing the UK</h2>        
  19.                  
  20.                
  21.                
  22.                
  23.         </div>
  24.        
  25.         <!--Top banner-->
  26.  
  27.  
  28.  
  29.        
  30.         <!--MAIN Content Col-->
  31.         <div class="col nomargin span_6_of_8">
  32.        
  33.  
  34.        
  35.         <?php
  36. //this is normally where the WP Loop would be. Instead we add a loop to get pods stuff
  37.         $mypod = pods('projects');
  38.         $mypod = array(
  39.                 'where' => 'permalink = "' . pods_var(-1, 'url') . '"',
  40.                 'limit' => -1);
  41.         $mypod->find('name ASC');      
  42.  
  43.       // set our variables
  44.        $name= $mypod->field('name');
  45.       $permalink= $mypod->field('permalink');
  46.       $project_image= $mypod->field('project_image');
  47.       $project_intro= $mypod->field('project_intro');
  48.       $project_description= $mypod->field('project_description');
  49.       $project_contacts= $mypod->field('project_contacts');
  50.  
  51.     ?>
  52.  
  53.  
  54. <h1 class="redbox"> <?php echo $name; ?></h1>
  55. <img src="<?php echo $project_image['guid']; ?>" alt="<?php echo $name; ?> Project"  />
  56. <p><?php echo $project_description; ?></p>
  57.  
  58. <p><?php echo $project_contacts; ?></p>
  59.  
  60.  
  61.                  
  62.                  
  63.         </div>
  64.        
  65.         <!--MAIN Content Col-->
  66.        
  67.        
  68.                
  69.        
  70.        
  71.        
  72. </div>
  73. <!--Section-->
  74.  
  75.  
  76.  
  77.                        
  78.                
  79.  
  80.  
  81.  
  82. <?php get_footer(); ?>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top