Automattic / Automattic/slush-theme-pattern-library

Primary menu is generated with a name mismatch

Open
#84 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
PHP
Stars
11
Forks
3
PR merge metrics
No merged PRs in 30d

Description

When generating a new "business" theme, the primary navigation is given two different names in two different files, meaning you can set a menu but it won't appear in your header as expected.

in header.php:

` 'primary', 'menu_id' => 'primary-menu' ) ); ?>`

in functions.php:

```
register_nav_menus( array(
'top' => esc_html__( 'Top Menu', 'pique' ),
'social' => esc_html__( 'Social Links Menu', 'pique' ),
) );
```

This leads to some pretty intense confusion if you don't realise they aren't properly named.

It looks as though the convention from the pattern library is to use "top" although I'd be inclined to use "primary" instead since it's more semantic & may result in less confusion for both users and developers (since most _s themes will be using "primary".)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.