How to put a Paypal donation button to your WordPress navigation menu

If you you want to have a Donation button on your WordPress navigation bar (primary menu), here’s how.

Login to your Paypal account and get the button code. They change the menus all the time, so search carefully. It is there.
Once you get the code, in your WordPress Admin page, select Appearance->Edit
Select Header.php on the right.

Scroll down to the end of the file until you see this

<?php wp_nav_menu( array( 'container' => false, 'menu_id' =>; 'primary-menu', 'theme_location' => 'primary-menu' ) ); >

Above it, add the following code:

<ul><li>

[Insert button code here]

</li></ul>

That’s it.

In addition, you may want to use a custom image for the button. To do this, replace the

"https://www.paypal.com/en_US/i/btn/x-click-but04.gif"

or similar with a link to the desired picture.
Some styling may be required, such as tweaking height,width,border-radius,padding and margins to match those of your theme’s style.css.

Leave a Comment