* The main template file. * * This is the most generic template file in a WordPress theme * and one of the two required files for a theme (the other being style.css). * It is used to display a page when nothing more specific matches a query. * E.g., it puts together the home page when no home.php file exists. * Learn more: http://codex.wordpress.org/Template_Hierarchy * * @package WordPress * @subpackage Boilerplate * @since Boilerplate 1.0 */ get_header(); ?> <?php /* Run the loop to output the posts. * If you want to overload this in a child theme then include a file * called loop-index.php and that will be used instead. */ $pods = new Pod('now_showing'); $pods->findRecords('name ASC', 25); echo $pods->showTemplate('upcoming'); // get_template_part( 'loop', 'index' ); ?> <?php // get_sidebar(); ?> <?php // get_footer();
/** * Shortcode support for WP Posts and Pages * * @param array $tags An associative array of shortcode properties * @since 1.6.7 */ function pods_shortcode($tags) { $defaults = array('name' => null, 'id' => null, 'slug' => null, 'select' => null, 'order' => null, 'orderby' => null, 'limit' => null, 'where' => null, 'search' => true, 'page' => null, 'filters' => false, 'filters_label' => null, 'filters_location' => 'before', 'pagination' => false, 'pagination_label' => null, 'pagination_location' => 'after', 'col' => null, 'template' => null, 'helper' => null); $tags = shortcode_atts($defaults, $tags); $tags = apply_filters('pods_shortcode', $tags); if (empty($tags['name'])) { return '<e>Please provide a Pod name'; } if (empty($tags['template']) && empty($tags['col'])) { return '<e>Please provide either a template or column name'; } // id > slug (if both exist) $id = empty($tags['slug']) ? null : $tags['slug']; $id = empty($tags['id']) ? $id : absint($tags['id']); $pod = new Pod($tags['name'], $id); $found = 0; if (empty($id)) { $params = array(); if (0 < strlen($tags['order'])) { $params['orderby'] = $tags['order']; } if (0 < strlen($tags['orderby'])) { $params['orderby'] = $tags['orderby']; } if (!empty($tags['limit'])) { $params['limit'] = $tags['limit']; } if (0 < strlen($tags['where'])) { $params['where'] = $tags['where']; } if (0 < strlen($tags['select'])) { $params['select'] = $tags['select']; } if (empty($tags['search'])) { $params['search'] = false; } if (0 < absint($tags['page'])) { $params['page'] = absint($tags['page']); } $params = apply_filters('pods_shortcode_findrecords_params', $params); $pod->findRecords($params); $found = $pod->getTotalRows(); } elseif (!empty($tags['col'])) { $val = $pod->get_field($tags['col']); return empty($tags['helper']) ? $val : $pod->pod_helper($tags['helper'], $val); } ob_start(); if (empty($id) && false !== $tags['filters'] && 'before' == $tags['filters_location']) { echo $pod->getFilters($tags['filters'], $tags['filters_label']); } if (empty($id) && 0 < $found && false !== $tags['pagination'] && 'before' == $tags['pagination_location']) { echo $pod->getPagination($tags['pagination_label']); } echo $pod->showTemplate($tags['template']); if (empty($id) && 0 < $found && false !== $tags['pagination'] && 'after' == $tags['pagination_location']) { echo $pod->getPagination($tags['pagination_label']); } if (empty($id) && false !== $tags['filters'] && 'after' == $tags['filters_location']) { echo $pod->getFilters($tags['filters'], $tags['filters_label']); } return ob_get_clean(); }
?> <div id="pendingsales"> <h2>Pending Listings</h2> <?php echo $PendingSale->showTemplate('pending_list'); ?> </div> <!-- ends div id pendingsales --> <?php } ?> <!-- list of sold (sold or leased listings --> <?php $SoldListing = new Pod('listings'); $status_sold = "(status = 'Sold' || status = 'Rented')"; $SoldListing->findRecords('name ASC', 10, $status_sold); $total_sold = $SoldListing->getTotalRows(); if ($total_sold > 0) { ?> <div id="soldlistings"> <h2>Sold or Leased</h2> <?php echo $SoldListing->showTemplate('sold_list'); ?> </div><!-- ends div id soldlistings --> <?php } ?>