You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+20-8Lines changed: 20 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -8,22 +8,24 @@ The default method of getting a menu to appear in the top right of a site using
8
8
9
9
* Since the menu is output from a widget, you end up with all of the extraneous widget and widget area markup - in a child theme with HTML5 support, that's the widget area `aside`, the widget `section`, and the widget wrap `div`. In themes without HTML5 support, it's three levels of `div` elements instead. Not only is this more DOM elements to render (performance), but all markup in the site header is pushing the real page content further down the source; search engines apparently put higher value on content at the top of the source (which is why Genesis ensures primary and secondary sidebars come lower in the source than the main content, irrespective of where they are displayed on screen).
10
10
* In HTML5 themes, what could be a site's main navigation is wrapped in an `aside` element. It's not known whether this has any impact on SEO. Theoretically at least, search engines may put less value on navigation found in an `aside` or otherwise treat it differently.
11
-
11
+
12
+
> "_I can't think of any good reason to use an aside in a header... what the hell would it be contextually related to? The logo? lol_" - **Robert Neu**
13
+
12
14
This plugin registers a new menu location called Header and, if a menu is assigned to it, displays it before the Header Right area. If you don't have any widgets in the Header Right area, then Genesis ensures that none of that widget area markup is output, so you end up with code like screenshot 2. If you do want a widget in the Header Right area, that's fine - it can be positioned and styled as you want, without negatively affecting the navigation menu as well.
13
15
14
16
## Screenshots
15
17
16
18

17
-
_Screenshot 1: Markup using Custom Menu widget._
19
+
_Screenshot 1: Markup using Custom Menu widget. Note the `aside`, `section` and `div` parents to `nav`._
18
20
19
21
---
20
22
21
23

22
-
_Screenshot 2: Markup using this plugin._
24
+
_Screenshot 2: Markup using this plugin.`nav` is a sibling element to the title area `div`._
23
25
24
26
## Requirements
25
27
* WordPress 3.0+
26
-
* Genesis 2.0+
28
+
* Genesis 2.1+
27
29
28
30
## Installation
29
31
@@ -59,6 +61,10 @@ This plugin supports the [GitHub Updater](https://github.com/afragen/github-upda
59
61
60
62
Once activated, head to Appearance -> Menus. Create a menu as usual, and assign it to the Header menu location.
61
63
64
+
## Backwards-incompatible Changes
65
+
66
+
The hook that filters the menu was called `genesis_do_header_nav` but is now called `genesis_header_nav` due to using the `genesis_header_nav()` function in Genesis 2.1.
0 commit comments