• Resolved red104

    (@red104)


    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)
  • 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, 9 months ago by superninchen.
    • This reply was modified 8 years, 9 months ago by superninchen.

    @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

    (@amazonlinkbuilder)

    @superninchen, Thanks for supporting the community.

    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.