简体   繁体   中英

Create a menu for the Wordpress Starkers theme

I'm fairly new to Wordpress. I'm using the 'naked' Starkers Theme. It's pretty awesome. http://starkers.viewportindustries.com/

The only thing I'm not getting is to add a menu or a widget. It says the theme doesn't support custom menus.

Also the theme doesn't have a sidebar. Do I have to add something to the code to make this work?

Maybe someone if familiar with the Starkers theme and could put me in the right direction. Thank you very much. And if this is a dumb question, i'm sorry.

This is the code:

  <?php Starkers_Utilities::get_template_parts( array( 'parts/shared/html-header',      'parts/shared/header' ) ); ?>

  <?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
  <h2><?php the_title(); ?></h2>
  <?php the_content(); ?>
  <?php comments_template( '', true ); ?>
  <?php endwhile; ?>

  <?php Starkers_Utilities::get_template_parts( array(    'parts/shared/footer','parts/shared/html-footer' ) ); ?>

Add code below into your functions.php file to give your theme menu support:

register_nav_menu('primary', __('Primary Menu', 'rs'));

And add this code into functions.php file to add sidebar into your theme.

if ( function_exists('register_sidebar') )
    register_sidebar();

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM