Esempio n. 1
0
 public function section_nav($args = array())
 {
     if (!is_array($args)) {
         $args = array();
     }
     $exclude = EdcMenu::nav_excluded_page_ids();
     if (isset($args['exclude']) && is_array($args['exclude'])) {
         $exclude = array_merge($args['exlude'], $exclude);
         unset($args['exclude']);
     }
     $topPage = $this->getSectionID();
     echo '<h2>' . (0 == $topPage ? '' : get_the_title($topPage)) . '</h2>';
     return wp_page_menu(array_merge(array('child_of' => $topPage, 'depth' => 2, 'sort_column' => 'menu_order', 'exclude' => $exclude), $args));
 }
Esempio n. 2
0
if ('page' == $mobilePageType) {
    //do the pages main content
    ?>
	<?php 
    the_content();
    ?>



<?php 
} else {
    //do the page-list and home pages main content
    ?>
	<ul class="nav">
<?php 
    $mobile_page_query = new WP_Query(array('post_type' => 'mobile_page', 'post_parent' => is_archive() ? 0 : get_the_ID(), 'posts_per_page' => -1, 'order' => 'ASC', 'orderby' => 'menu_order', 'post__not_in' => EdcMenu::nav_excluded_page_ids(true)));
    while ($mobile_page_query->have_posts()) {
        $mobile_page_query->the_post();
        ?>
		<li id="post-<?php 
        the_ID();
        ?>
">
			<a href="<?php 
        the_permalink();
        ?>
"><?php 
        the_title();
        ?>
</a>
		</li>