Nav menu category links not showing

A wp_nav_menu is a manually created menu – WordPress doesn’t create it for you. If you want to keep using this function, you can go to either Appearance > Menus or Appearance > Customize > Menus, add links to the menu, and check the “primary” theme location under Display Location.

However – if you’re just wanting to show category links, it’s better to use one of the built-in options so that you don’t have to manually add each category and keep them updated.

Option 1: create a sidebar and use the built-in “Categories” widget.

Option 2: pure code:

<?php
$args = array(
  'orderby' => 'name',
  'parent' => 0
  );
$categories = get_categories( $args );
foreach ( $categories as $category ) {
    echo '<a href="' . get_category_link( $category->term_id ) . '">' . $category->name . '</a><br/>';
}
?>