codebloo

PODS CMS - Listing items on press/*

Oct 17th, 2013
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. <?php
  2. /* Template Name: List */
  3. get_header(); ?>
  4. <section class="columns sixteen alpha omega">
  5.  
  6. <?php
  7. $id = pods_url_variable('last');
  8.  
  9. // Get all records per page, ordered by name ascending, matching the press year to the end of the url
  10. $params = array( 'orderby' => 'name ASC', 'limit' => -1, 'where' => 'press_year = "'.$id.'"' );
  11.  
  12. // Maps to the new find method
  13. $press = pods( 'press', $params );
  14.  
  15. // Display it to the template
  16. echo $press->find( $params )->template( 'Press Item' );
  17.  
  18. ?>
  19.  
  20. </section>
  21.  
  22. <?php get_footer();?>
Advertisement
Add Comment
Please, Sign In to add comment