Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

CSS Building a WordPress Theme with Foundation 5

why is the nav menu still showing as bullet points?

So I am watching the course: Building a WordPress Theme with Foundation 5

In my nav menus it shows it as bullet points instead of menu items. What should I be looking at?

1 Answer

It will be better if you paste your code. But for now, I will assume my code as yours. Let's start We will assume that you navbar HTML is

<ul class="nav-bar">
<li>Home</li>
<li>About</li>
<li></li>
</ul>

Then your in your should be:

.nav-bar {
list-style: none;
}

In some case this may not work. if not try

.nav-bar{
list-style-type: none;
}

If these are not working then try to add this styles to the <li> inside the nav-bar class.

I haven't watched the video. This is the basic css. So if it's wrong, sorry.

Hey, your answer seems correct and I have tried both and nothing has changed. I put debug mode on and I get this error, but I am unsure if it is related:

Warning: call_user_func_array() expects parameter 1 to be a valid callback, function 'upability_register_custom_menu' not found or invalid function name in /Users/danale/Downloads/mediafuel_workshop/wp-includes/class-wp-hook.php on line 298

I started this site using the underscores.me skeleton so my functions.php looks like this:

<?php /**

if ( ! function_exists( 'upability_setup' ) ) : /**

  • Sets up theme defaults and registers support for various WordPress features. *
  • Note that this function is hooked into the after_setup_theme hook, which
  • runs before the init hook. The init hook is too late for some features, such
  • as indicating support for post thumbnails. */

function upability_setup() { /* * Make theme available for translation. * Translations can be filed in the /languages/ directory. * If you're building a theme based on UpAbility, use a find and replace * to change 'upability' to the name of your theme in all the template files. */ load_theme_textdomain( 'upability', get_template_directory() . '/languages' );

// Add default posts and comments RSS feed links to head.
add_theme_support( 'automatic-feed-links' );

/*
 * Let WordPress manage the document title.
 * By adding theme support, we declare that this theme does not use a
 * hard-coded <title> tag in the document head, and expect WordPress to
 * provide it for us.
 */
add_theme_support( 'title-tag' );

/*
 * Enable support for Post Thumbnails on posts and pages.
 *
 * @link https://developer.wordpress.org/themes/functionality/featured-images-post-thumbnails/
 */
add_theme_support( 'post-thumbnails' );

// This theme uses wp_nav_menu() in one location.
register_nav_menus(array(
    'primary' => __( 'Primary Menu' ),'topnav' => __( 'Top Nav Menu' ) ) );
// register_nav_menus( array(
//  'menu-1' => esc_html__( 'Primary', 'upability' ),
// ) );

/*
 * Switch default core markup for search form, comment form, and comments
 * to output valid HTML5.
 */
add_theme_support( 'html5', array(
    'search-form',
    'comment-form',
    'comment-list',
    'gallery',
    'caption',
) );

// Set up the WordPress core custom background feature.
add_theme_support( 'custom-background', apply_filters( 'upability_custom_background_args', array(
    'default-color' => 'ffffff',
    'default-image' => '',
) ) );

// Add theme support for selective refresh for widgets.
add_theme_support( 'customize-selective-refresh-widgets' );

} endif; add_action( 'after_setup_theme', 'upability_setup' );

add_action('init', 'upability_register_custom_menu');

/**

  • Set the content width in pixels, based on the theme's design and stylesheet. *
  • Priority 0 to make it available to lower priority callbacks. *
  • @global int $content_width */ function upability_content_width() { $GLOBALS['content_width'] = apply_filters( 'upability_content_width', 640 ); } add_action( 'after_setup_theme', 'upability_content_width', 0 );

/**

  • Register widget area. *
  • @link https://developer.wordpress.org/themes/functionality/sidebars/#registering-a-sidebar */ function upability_widgets_init() { register_sidebar( array( 'name' => esc_html_( 'Sidebar', 'upability' ), 'id' => 'sidebar-1', 'description' => esc_html_( 'Add widgets here.', 'upability' ), 'before_widget' => '<section id="%1$s" class="widget %2$s">', 'after_widget' => '</section>', 'before_title' => '<h2 class="widget-title">', 'after_title' => '</h2>', ) ); } add_action( 'widgets_init', 'upability_widgets_init' );

/**

  • Enqueue scripts and styles. */

function upability_scripts() { wp_deregister_script('jquery'); wp_register_script('jquery','http://code.jquery.com/jquery-2.2.4.min.js', false, null); wp_enqueue_script('jquery'); } if(!is_admin()) add_action('wp_enqueue_scripts','upability_scripts');

function upability_styles() { wp_enqueue_style( 'upability', get_template_directory_uri() . '/assets/css/foundation.css' ); wp_enqueue_style( 'upability_icons', get_template_directory_uri() . '/assets/css/foundation-icons.css' ); wp_enqueue_style( 'theme_css', get_template_directory_uri() . '/style.css' );

wp_enqueue_script('upability_js', get_template_directory_uri() . '/js/vendor/foundation.js');

// wp_enqueue_script( 'upability-navigation', get_template_directory_uri() . '/js/navigation.js', array(), '20151215', true );

// wp_enqueue_script( 'upability-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20151215', true );

if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
    wp_enqueue_script( 'comment-reply' );
}

} add_action( 'wp_enqueue_scripts', 'upability_styles' );

/**

  • Implement the Custom Header feature. */ require get_template_directory() . '/inc/custom-header.php';

/**

  • Custom template tags for this theme. */ require get_template_directory() . '/inc/template-tags.php';

/**

  • Custom functions that act independently of the theme templates. */ require get_template_directory() . '/inc/extras.php';

/**

  • Customizer additions. */ require get_template_directory() . '/inc/customizer.php';

/**

  • Load Jetpack compatibility file. */ require get_template_directory() . '/inc/jetpack.php';

My style.css:

Navigation

--------------------------------------------------------------*/

/* Top Nav */

.top-nav { width: 100%; background: #219CD7; padding: 0; margin: 0; }

.top-list-right { padding: 0; margin: 0; list-style: none; overflow: hidden; float: right;

li {
    list-style: none;
    float: left;
    padding: 10px 15px;
    font-size: 13px;
}

a {
    color: #ffffff;
}

}

/* Top Bar */

.top-bar {

}

K.. Will try to help! If you wrote this on workspaces please share the link.