Title: Custom Template for Button Styling?
Last modified: July 27, 2017

---

# Custom Template for Button Styling?

 *  Resolved [red104](https://wordpress.org/support/users/red104/)
 * (@red104)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/custom-template-for-button-styling/)
 * Hello all!
 * I was wondering if someone had some code for a button-styled template as a product
   link? I love using this plugin, but since I can only generate short codes, I 
   cannot insert these into my MaxButtons plugin (which will only redirect to a 
   specific http link, and doesn’t translate the short code).
 * I could of course just generate my link for the product through the Amazon Associates
   panel and paste that link, but I was looking for something a little less time
   consuming and possibly more efficient.

Viewing 4 replies - 1 through 4 (of 4 total)

 *  [superninchen](https://wordpress.org/support/users/superninchen/)
 * (@superninchen)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/custom-template-for-button-styling/#post-9358597)
 * I did something like this:
 * 1. Create two PNGs in the shape of the button I want to be displayed. One inactive(
   normal), and one for the mouseover (hover).
 * 2. Create a template named “Custom-product-button”:
 *     ```
       {{#Items}}
         {{#Item}}
           {{#aalb}}
       	<a href="{{DetailPageURL}}" target="_blank" rel="nofollow" class="mybutton" title="See product at amazon" onclick="trackOutboundLink('Affiliate', 'Button', '{{DetailPageURL}}'); return false;">See product</a>
           {{/aalb}}
         {{/Item}}
       {{/Items}}
       ```
   
 * 3. Add a custom CSS to my theme:
 *     ```
       .mybutton {
           display: inline-block;
           width: 157px;
           height: 22px;
         	background: url("/wp-content/uploads/2017/02/button-normal.png") no-repeat;
           text-indent: -99999px;
       }
       .mybutton:hover {
         background: url("/wp-content/uploads/2017/02/button-hover.png") no-repeat;
         background-position: 0 0;
       }
       ```
   
 * Hope this helps
    -  This reply was modified 8 years, 10 months ago by [superninchen](https://wordpress.org/support/users/superninchen/).
    -  This reply was modified 8 years, 10 months ago by [superninchen](https://wordpress.org/support/users/superninchen/).
 *  [superninchen](https://wordpress.org/support/users/superninchen/)
 * (@superninchen)
 * [8 years, 9 months ago](https://wordpress.org/support/topic/custom-template-for-button-styling/#post-9390636)
 * [@uwhoosh](https://wordpress.org/support/users/uwhoosh/) Thank you for the feedback.
   Indeed, I forgot to delete the onclick event for GA tracking. Unfortunately I
   cannot edit the the post anymore. 🙁
 *  Plugin Author [Amazon Associates Link Builder](https://wordpress.org/support/users/amazonlinkbuilder/)
 * (@amazonlinkbuilder)
 * [8 years, 9 months ago](https://wordpress.org/support/topic/custom-template-for-button-styling/#post-9407956)
 * [@superninchen](https://wordpress.org/support/users/superninchen/), Thanks for
   supporting the community.
 *  [superninchen](https://wordpress.org/support/users/superninchen/)
 * (@superninchen)
 * [8 years, 9 months ago](https://wordpress.org/support/topic/custom-template-for-button-styling/#post-9409348)
 * Welcome.
 * I’m always glad if I can help.
 * 🙂

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Custom Template for Button Styling?’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/amazon-associates-link-builder_fec375.
   svg)
 * [Amazon Associates Link Builder](https://wordpress.org/plugins/amazon-associates-link-builder/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/amazon-associates-link-builder/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/amazon-associates-link-builder/)
 * [Active Topics](https://wordpress.org/support/plugin/amazon-associates-link-builder/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/amazon-associates-link-builder/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/amazon-associates-link-builder/reviews/)

 * 4 replies
 * 3 participants
 * Last reply from: [superninchen](https://wordpress.org/support/users/superninchen/)
 * Last activity: [8 years, 9 months ago](https://wordpress.org/support/topic/custom-template-for-button-styling/#post-9409348)
 * Status: resolved