PHPackages                             garyjones/genesis-header-nav - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. garyjones/genesis-header-nav

AbandonedArchivedWordpress-plugin[Utility &amp; Helpers](/categories/utility)

garyjones/genesis-header-nav
============================

WordPress plugin that registers a menu location and displays it inside the header for a Genesis Framework child theme.

2.1.0(9y ago)683.3k17GPL-2.0+PHPPHP &gt;=5.3.4

Since Aug 10Pushed 8y ago14 watchersCompare

[ Source](https://github.com/GaryJones/genesis-header-nav)[ Packagist](https://packagist.org/packages/garyjones/genesis-header-nav)[ Docs](https://github.com/garyjones/genesis-header-nav)[ RSS](/packages/garyjones-genesis-header-nav/feed)WikiDiscussions develop Synced 4d ago

READMEChangelog (7)Dependencies (1)Versions (3)Used By (0)

Genesis Header Nav
==================

[](#genesis-header-nav)

WordPress plugin that registers a menu location and displays it inside the header for a Genesis Framework child theme.

Description
-----------

[](#description)

The default method of getting a menu to appear in the top right of a site using a child theme of the Genesis Framework, is to add a create a menu in Appearance -&gt; Menus, and then place a Custom Menu widget in the Header Right widget area. While this works, it produces markup as seen in screenshot 1, and which has the following problems:

- 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).
- 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.

    > "*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**

This plugin registers a new menu location called Header and, if a menu is assigned to it, displays it after 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.

Screenshots
-----------

[](#screenshots)

[![Screenshot of markup using Custom Menu widget](assets/screenshot-1.png)](assets/screenshot-1.png)
*Screenshot 1: Markup using Custom Menu widget. Note the `aside`, `section` and `div` parents to `nav`.*

---

[![Screenshot of markup using this plugin](assets/screenshot-2.png)](assets/screenshot-2.png)
*Screenshot 2: Markup using this plugin. `nav` is a sibling element to the title area `div`.*

Requirements
------------

[](#requirements)

- PHP 5.3+
- WordPress 3.9+
- Genesis 2.1+

Installation
------------

[](#installation)

### Upload

[](#upload)

1. Download the latest tagged archive (choose the "zip" option).
2. Go to the **Plugins -&gt; Add New** screen and click the **Upload** tab.
3. Upload the zipped archive directly.
4. Go to the Plugins screen and click **Activate**.

### Manual

[](#manual)

1. Download the latest tagged archive (choose the "zip" option).
2. Unzip the archive.
3. Copy the folder to your `/wp-content/plugins/` directory.
4. Go to the Plugins screen and click **Activate**.

Check out the Codex for more information about [installing plugins manually](http://codex.wordpress.org/Managing_Plugins#Manual_Plugin_Installation).

### Git

[](#git)

Using git, browse to your `/wp-content/plugins/` directory and clone this repository:

`git clone git@github.com:GaryJones/genesis-header-nav.git`

Then go to your Plugins screen and click **Activate**.

Updates
-------

[](#updates)

This plugin supports the [GitHub Updater](https://github.com/afragen/github-updater) plugin, so if you install that, this plugin becomes automatically updateable direct from GitHub.

Change Log
----------

[](#change-log)

See the [CHANGELOG.md](CHANGELOG.md).

Usage
-----

[](#usage)

Once activated, head to Appearance -&gt; Menus. Create a menu as usual, and assign it to the Header menu location.

Backwards-incompatible Changes
------------------------------

[](#backwards-incompatible-changes)

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.

**2.0.0:** Custom language files previously loaded from (example) `WP_LANG_DIR . '/genesis-header-nav/genesis-header-nav-en_GB.po'` now need to be placed at `WP_LANG_DIR . '/plugins/genesis-header-nav-en_GB.po'`, as per language packs.

**2.0.0:** This plugin uses PHP namespaces, so you'll need PHP 5.3+ powering your site.

Customising
-----------

[](#customising)

### CSS

[](#css)

The plugin should work with all Genesis child themes, though you may need to add styles to position the output in the traditional place of top right, e.g.:

```
.nav-header {
	float: right;
	text-align: right;
	width: 50%;
}
```

Adjust the width as needed to allow enough space for your title area and menu items.

### Priority

[](#priority)

The plugin includes a `genesis_header_nav_priority` filter, with a default value of `12`. Use the following values to reposition the nav accordingly:

- Before the `` element, inside the `.site-container`: 0-4
- Before the title + widget area: 5-9
- After the title + widget area: 10-14
- After the `` element: 15+

If you want to add it in between the title and widget area, you'll need to unhook and re-build `genesis_do_header()` function so that the output of the widget area is in a different function that can be hooked to a later priority.

As an example, to add the nav before the title + widget area markup in the source, you can use the following:

```
add_filter( 'genesis_header_nav_priority', 'prefix_genesis_header_nav_priority' );
/**
 * Change the order of the nav within the header (Genesis Header Nav plugin).
 *
 * @param int $priority Existing priority. Default is 12.
 *
 * @return int New priority.
 */
function prefix_genesis_header_nav_priority( $priority ) {
	return 8;
}
```

### Top Menu (above ``)

[](#top-menu-above-header)

If you give the above priority filter a value of less than 5, then the output will be before the ``, so that you can display what might be considered a Top menu. Of course, this might mean that the "Header" menu location label is confusing, but since that string is internationalised, it's possible to filter that and change it to make it easier for users to understand:

```
add_filter( 'gettext', 'prefix_genesis_header_nav_name', 10, 3 );
/**
 * Change the name of the Header menu location added by Genesis Header Nav plugin.
 *
 * @param string $translated_text Translated text.
 * @param string $original_text   Original text.
 * @param string $domain          Text domain.
 */
function prefix_genesis_header_nav_name( $translated_text, $original_text, $domain ) {
	if ( 'genesis-header-nav' === $domain && 'Header' === $original_text ) {
		return 'Top';
	}
	return $translated_text;
}
```

### Removing the Menu

[](#removing-the-menu)

If you want the menu to not display, perhaps on a landing page, then you can do the following:

```
add_action( 'init', 'prefix_genesis_header_nav_remove', 11 );
/**
 * Remove Genesis Header Nav menu.
 */
function prefix_genesis_header_nav_remove() {
	if ( function_exists( 'Gamajo\GenesisHeaderNav\get_plugin' ) ) {
		remove_action( 'genesis_header', array( Gamajo\GenesisHeaderNav\get_plugin(), 'show_menu' ), apply_filters( 'genesis_header_nav_priority', 12 ) );
	}
}
```

Credits
-------

[](#credits)

Built by [Gary Jones](https://twitter.com/GaryJ)
Copyright 2013 [Gamajo Tech](http://gamajo.com/)

###  Health Score

35

—

LowBetter than 79% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity32

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 93.3% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

3565d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/ba7751eebec0f74a4963e9a062f49e58222b97872bf193d95f0505f3df321d09?d=identicon)[GaryJones](/maintainers/GaryJones)

---

Top Contributors

[![GaryJones](https://avatars.githubusercontent.com/u/88371?v=4)](https://github.com/GaryJones "GaryJones (42 commits)")[![craigsimps](https://avatars.githubusercontent.com/u/11818429?v=4)](https://github.com/craigsimps "craigsimps (2 commits)")[![afragen](https://avatars.githubusercontent.com/u/1296790?v=4)](https://github.com/afragen "afragen (1 commits)")

---

Tags

genesis-frameworkheadernavigationwordpress-pluginnavigationgenesisgenesis-header-nav

### Embed Badge

![Health badge](/badges/garyjones-genesis-header-nav/health.svg)

```
[![Health](https://phpackages.com/badges/garyjones-genesis-header-nav/health.svg)](https://phpackages.com/packages/garyjones-genesis-header-nav)
```

###  Alternatives

[spatie/menu

Html menu generator

7592.9M6](/packages/spatie-menu)[verbb/navigation

Create navigation menus for your site.

90683.7k17](/packages/verbb-navigation)[kartik-v/yii2-widget-sidenav

An enhanced side navigation menu styled for bootstrap (sub repo split from yii2-widgets)

364.0M8](/packages/kartik-v-yii2-widget-sidenav)[pingpong/menus

Laravel Menus

70194.4k13](/packages/pingpong-menus)[kartik-v/yii2-widget-affix

A scrollspy and affixed enhanced navigation to highlight page sections (sub repo split from yii2-widgets)

153.8M3](/packages/kartik-v-yii2-widget-affix)[akaunting/laravel-menu

Menu and sidebar management package for Laravel

38233.8k](/packages/akaunting-laravel-menu)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
