Hook where? (Navigation hook in GeneratePress)

Ivan Oung
Web Development
In this article...

How Hooks in WordPress behaves, and how to add a CTA button to the main menu for better lead conversion.

Since hook functionality was opened up in WordPress, life is great for developers because we no longer have to temper the theme code to introduce something as small as a top bar for promotion.

However, it was a pain in the a** trying to figure out where all the hooks are located (especially mobile).

As such, here’s a quick guideline for navigation hooks, and with mobile as well.


Original without hooks
Desktop with hooks

Honorable mention

There’s an official GeneratePress hooks visual guide at the official site (without the mobile version).

It’s not a huge deal, but I just thought it would be even more helpful to see the differences between how one behaves on a desktop and in mobile.

GeneratePress documentation – Hooks Visual Guide

Thoughts on hooks

Ultimately, the goal of any good business website is to generate leads/convert traffic into opportunities.

To encourage the odd of conversion, it is proven by data that having a prominent CTA on the top right-hand corner is one of the best ways to achieve such results.

ivanoung.io website mobile header
Mobile header
ivanoung.io website desktop header
Desktop header

To place a prominent button at the end of the main menu, the two available configurations are:

  • inside_mobile_menu
  • after_primary_menu
GeneratePress Elements setting for header optimized for lead generation
Setting in GeneratePress

However, the way how those two hooks behave is a bit different from what most of us would expect – showing up at the end of the mobile menu bar. So, make sure to take extra steps to cater to the mobile view when optimizing for lead conversion with a CTA button inside the main menu bar!

Share this with your friends if you think is helpful!!

Ivan Oung

Born in Hong Kong and grew up in Canada, Ivan is a husband and a board game lover. After spending 10+ years building digital products, he is now committed to helping SMEs get more leads by building effective websites that turn attention into opportunities.

You might also enjoy...

Google analytic meme

Fathom vs Google Analytics (Google Analytics alternative)

A quick comparison between Google Analytics and Fathom, and explore the possibility if Fathom is truly the GA-killer that it claims to be.
Web Development

Reusable blocks vs Global styles vs Local pattern (GenerateBlocks & GeneratePress)

A quick comparison between Reusable blocks, Global styles and Local patterns in GenerateBlocks and GeneratePress, and a guide on when to use them, respectively.

Documentation templates for Product team

A brief list of documentations for any small product team to start growing right away without starting from scratch.

Let's Get Started with your new site!

Questions? Let's talk about whether I make sense for your business.

Contact Form

Expect a fast response from me :)

Ready To Have The
Best Website In Your Industry?

Get a ***FREE*** 30 business consultation on how I can get you more leads and grow your business!

Contact Form

Share to...