public static function archive($post_type) { wb_set('current_url', get_post_type_archive_link($post_type)); query_posts(array('post_type' => $post_type)); if (!($template = get_archive_template())) { $template = WB_PATH . '/archive.php'; } wb_link_hack(true); include $template; wb_link_hack(false); wp_reset_query(); }
/** * Enable/Disable layout * * @param boolean $flag */ function wb_set_layout($flag = true) { return wb_set('has_layout', (bool) $flag); }
$first = true; foreach ($node->children as $child) { $item = $child->item; $id = wb_url_to_slug($item->url); ?> <div id ="<?php echo $id; ?> " class="tab-pane fade<?php echo $first ? ' in active' : ''; ?> "> <?php wb_set('is_block', true); wb_render_item($item); wb_set('is_block', false); ?> </div> <?php $first = false; } ?> </div> </div> <?php } ?> </section> <?php } ?>