Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- get_header();
- $term = get_term_by('slug', get_query_var('term' ), get_query_var('taxonomy'));
- ?>
- <div id="info-cnt">
- <div id="info-lg" class="info-style <?= $p; ?>">
- <!-- Download PDF -->
- <div id="bx-pdf"> <img src="<?php bloginfo('template_url'); ?>/images/icon-pdf.gif" alt="PDF Document" width="20" height="20">
- <p><a href="<?php bloginfo('home'); ?>/pdf/menu-<?= $term->slug;?>.pdf" title="Download PDF" target="_blank">Download PDF</a></p>
- </div>
- <h1><?= $term->name; ?></h1>
- <?php
- // get all the categories from the database
- $args = array(
- 'type' => 'menu-items',
- 'parent' => $term->term_id,
- 'taxonomy' => 'menu-cat',
- );
- $cats = get_categories($args);
- ?>
- <div class="menu">
- <?php if(is_tax('menu-cat') && isset($is_mobile)): ?>
- <a href="<?php bloginfo('url'); ?>/menus/" id="mobile-menu" class="btn">MENUS</a>
- <?php else: ?>
- <a href="<?php bloginfo('url'); ?>/menus/" class="btn desktop-menu">BACK TO MENUS</a>
- <?php endif; ?>
- <p>Kitchen Open Until 1AM Daily</p>
- <hr>
- <?php
- // loop through the categries
- foreach ($cats as $cat) :
- // setup the cateogory ID
- $cat_id = $cat->term_id;
- // Make a header for the cateogry
- echo "<h2>".$cat->name."</h2>";
- $termDescription = term_description( $cat->term_id, get_query_var( 'taxonomy' ) );
- echo ($termDescription ? "<div class='tag-desc'>$termDescription</div>" : "");
- // create a custom wordpress query
- //query_posts("cat=$cat_id&post_per_page=100");
- $arg = array(
- 'post_type' => 'menu-items',
- 'tax_query' => array(
- array(
- 'taxonomy' => 'menu-cat',
- 'field' => 'id',
- 'terms' => array($cat_id)
- )
- ),
- 'orderby' => 'menu_order',
- 'order' => 'asc'
- );
- $items = new WP_Query($arg);
- // start the wordpress loop
- while ($items->have_posts()) : $items->the_post(); ?>
- <?php idea_menu(); ?>
- <?php
- endwhile;
- endforeach; ?>
- </div>
- </div>
- </div>
- <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement