Advertisement
Guest User

FacetWP template

a guest
Jul 16th, 2018
6
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.48 KB | None | 0 0
  1. <?php
  2. $params = array( 'limit' => -1 );
  3. $pods = pods( 'sop_course', $params );
  4. if ( $pods->total() > 0 ) {
  5.     while( $pods->fetch() )  {
  6.  
  7.         //reset id
  8.         $pods->id = $pods->id();
  9.          
  10.         //get the template
  11.         $temp = $pods->template( 'All Courses Archive Page' );
  12.         //output template if it exists
  13.         if ( isset( $temp )  ) {  
  14.             echo $temp;
  15.         }
  16.  
  17.     }
  18.  
  19. }
  20. else {
  21.     echo 'No content found.';
  22.  
  23. }
  24. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement