Black Friday Sale! Get up to $30 off GP Premium! Learn more ➝

Reply To: Adding a button to menu. Workaround?

Home Forums Support Adding a button to menu. Workaround? Reply To: Adding a button to menu. Workaround?

Home Forums Support Adding a button to menu. Workaround? Reply To: Adding a button to menu. Workaround?

#109155
Tom
Lead Developer
Lead Developer

You could try adding your button HTML into the navigation hook:

add_action( 'generate_inside_navigation','generate_add_navigation_button' );
function generate_add_navigation_button()
{ ?>
       <a class="my-custom-button" href="button URL">Button text</a>
<?php }

Then you can style your button and float it to the right:

.my-custom-button,
.my-custom-button:visited {
      float: right;
      display: inline-block;
      padding: 10px 15px;
      background: #000000;
      color: #FFFFFF;
}

.my-custom-button:hover {
      background: #FFFFFF;
      color: #000000;
}

Adding PHP: http://generatepress.com/knowledgebase/adding-php-functions/
Adding CSS: http://generatepress.com/knowledgebase/adding-css/