• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

WP SITES

2784

Original Genesis Tutorials & 6000+ Guaranteed Code

Snippets

  • Consultation
  • Full Access
  • Log in

Add Button To Genesis Header Right Hook

This basic tip enables you to remove the header right widget area and hook in a clickable button.

Simply add the following PHP code to the end of your child themes functions.php file.

unregister_sidebar( 'header-right' );

add_action( 'genesis_header_right', 'hook_header_right' );
function hook_header_right() {
echo'<a class="button" href="http://example.com">Click Button</a>';
}

Swap out the genesis_header_right hook with any other genesis hook.

Based on this question from a member of the StudioPress community:

Enterprise Pro theme – Header Right widget area : We want to add a “donate” button in the upper right of the header area. However, when I added the text widget, it increases the height of the header area creating more empty space below the header image — instead of aligning with the header so it is balanced. I’ve tried coding it different ways, but am at a loss. Any ideas?

Reader Interactions

Leave a Reply Cancel reply

You must be logged in to post a comment.

Primary Sidebar

Code written by Brad Dalton specialist for Genesis, WooCommerce & WordPress theme customization. Read More…

Advertise · WPEngine · Genesis · Log in

  • Access Problems
  • Account Details
  • Consulting
  • Tags