Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding Menu functionality to Theme #122

Merged
merged 1 commit into from
Dec 30, 2012
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion wp-content/themes/svbtle/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ function theme_admin_header_image() {
}

function register_custom_menu() {
register_nav_menu('custom_menu', __('Svbtle Menu'));
register_nav_menu( 'primary', __( 'Svbtle Menu') );
}

require_once ( get_stylesheet_directory() . '/theme-options.php' );
Expand Down
18 changes: 1 addition & 17 deletions wp-content/themes/svbtle/header.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,25 +60,9 @@
<?php bloginfo( 'description' ); ?>
</h2>
</li>


<?php
$mypages = get_pages( );

foreach( $mypages as $page ) {
$content = $page->post_content;
if ( ! $content ) // Check for empty page
continue;

$content = apply_filters( 'the_content', $content );
?>
<li class="link">
<a href="<?php echo get_page_link( $page->ID ); ?>"><?php echo $page->post_title; ?></a>
</li>

<?php
}
?>
<?php wp_nav_menu( array( 'theme_location' => 'primary', 'menu_class' => 'nav-menu' ) ); ?>

<?php if (!empty($options['twitter_username'])): ?>
<li class="link twitter">
Expand Down