<div id="mainNav"> <?php wp_nav_menu( array( 'theme_location' => 'primary', 'container' => '', 'depth' => 1, 'fallback_cb' => 'default_primary_nav' ) );?> </div>
function default_primary_nav() {
global $wp_query;
echo '<ul>';
echo '<li class="page_item ';
if (is_front_page() && !isset($_GET['submit']) && !isset($_GET['myjobs'])) echo 'current_page_item';
echo '"><a href="'.get_bloginfo('url').'">'.__('Latest Jobs', 'appthemes').'</a></li>';
$args = array(
'hierarchical' => false,
'parent' => 0
);
$terms = get_terms( 'job_type', $args );
if ($terms) foreach($terms as $term) :
echo '<li class="page_item ';
if ( isset($wp_query->queried_object->slug) && $wp_query->queried_object->slug==$term->slug ) echo 'current_page_item';
echo '"><a href="'.get_term_link( $term->slug, 'job_type' ).'">'.$term->name.'</a></li>';
endforeach;
echo '</ul>';
}
There are currently 1 users browsing this thread. (0 members and 1 guests)