Support » Plugin: PG Simple Affiliate Shop » Clickable Images & Other Buttons

  • Resolved Bellcross


    Hi again,

    Just wondering if it’d be possible to make product images clickable with the affiliate link as well? Before switching over to this plugin I’ve been doing some tracking ID testing and found more than half of my clicks come from my images.

    And a less important question, how hard would it be to replace the CSS button with a custom button image? Because I feel an Amazon “buy now” button (or other high profile name) would be clicked more because people trust the logo. But I have no data to back that up.


Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author PeoplesGeek


    Hi again Belcross,

    I’m sorry this has taken a while to respond, I missed your thread starting up.

    This is something I can add and will make it an option on the options page for the next release.

    Until then you can adjust the following lines in the plugin and the link will become clickable and go to the same place as the button.

    $output .= '<a " href="'.$this->get_metavalue($post_id, 'link').'" target="_blank" rel="nofollow">'."\n";;
    $output .= '<img class="alignleft pg-sas-image" src="'. $this->get_metavalue($post_id, 'image'). '" alt="'. get_the_title(). '" >'."\n";
    $output .= '</a>'."\n";

    You need to add the first and last line – the middle one is already in the plugin at around line 542

    You can override the button that is shown using CSS by placing it in the folder of your theme too so you should be able to add any button like Amazon as you suggested.

    Let me know how you go and thanks for using the plugin and thanks for suggesting improvements.

    Brian (PeoplesGeek)

    Plugin Author PeoplesGeek


    I have just added this code to the version about to come out so it will be an option you can select in settings for all images going forward from version 1.3.3

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Clickable Images & Other Buttons’ is closed to new replies.