<div id="content" role="main"> <?php while (have_posts()) { the_post(); ?> <?php $part = 'content'; if (meetup_is_speaker_page()) { $part = 'speakers'; } elseif (meetup_is_sponsor_page()) { $part = 'sponsors'; } elseif (meetup_is_schedule_page()) { $part = 'schedule'; } elseif (meetup_is_attendies_page()) { $part = 'attendies'; } elseif (meetup_is_gallery_page()) { $part = 'gallery'; } $part = apply_filters('meetup_single_template_part', $part); meetup_get_template_part('meetup', $part); ?> <?php } // end of the loop. ?> </div><!-- #content --> </div><!-- #primary -->
/** * Generates the navigation menu * * @return string */ function meetup_navigation() { $items = meetup_get_navigation(); $menu = '<ul class="meetup-navigation">'; $current_menu = 'details'; if (meetup_is_speaker_page()) { $current_menu = 'speakers'; } elseif (meetup_is_sponsor_page()) { $current_menu = 'sponsors'; } elseif (meetup_is_schedule_page()) { $current_menu = 'schedule'; } elseif (meetup_is_attendies_page()) { $current_menu = 'attendies'; } elseif (meetup_is_gallery_page()) { $current_menu = 'gallery'; } $current_menu = apply_filters('meetup_current_menu', $current_menu, $items); foreach ($items as $key => $item) { $class = $key == $current_menu ? ' class="active"' : ''; $menu .= sprintf('<li%s><a href="%s">%s</a></li>', $class, $item['link'], $item['title']); } $menu .= '</ul>'; return $menu; }