How to Generate a Button Code using WordPress


I got an email from my friend Christin (you remember, the one who so generously sponsored my trip to Allume last fall), letting me know that she had a new image and link for her site.

However, she sent me a photo and a link, I wasn’t really sure what to do with that. In my widgets, I can either paste in html code, or I can add an image, but to add an image I needed a URL of it, and not the actual image uploaded. So, I wasn’t sure how to proceed.

I found an easy way and decided to share it with you. This is a “dummy’s” method to creating your own button code for any image (that you have permission to use, of course).

Step 1: From your dashboard, start a new post (don’t worry, we aren’t going to publish it).  And click the upload/insert photo button. I’m assuming you can do that, but here’s a screen shot for your viewing pleasure:

Step 2: After you select your file and it’s uploaded, go ahead and enter in the other information. You’ll want to enter the desired url address, you can also change the size here:

 After you add your photo, it should look like this (ignore my simple facebook message in pink…not at all relevant to this This is what your photo will look like.

Step 4: Go to the “html” tab, and copy the code given.  This is your button code.

And, there you have it :)  That’s your button code for those who, like me, know very little about computers, html, etc…this is a cheater’s way to get it.

To use this code, all you have to do is go to your widgets, and choose the “text” (arbitrary text or html) option, and paste it in. Easy peasy, and if you look to the right you can see Christin’s new button on my sidebar.



  1. says

    Love that it can be made so simple in WP. I generally end up googling “how to make button code” and scrolling through a few lousy posts before finding a clear-cut answer. Thanks for sharing this “cheaters” version. Shortcuts are great! Visiting you this morning from Christian Mommy Blogger. Hope your weekend is spectacular, Crystal!

    • Crystal says

      Jelli, I do the exact same thing, and sometimes I still end up doing something wrong. I was excited to think of this instead, and even more excited that it actually worked :)

Leave a Reply to Crystal Cancel reply

Thank you for joining in the discussion!