WordPress.org

Ready to get started?Download WordPress

Forums

PG Simple Affiliate Shop
[resolved] Clickable Images & Other Buttons (3 posts)

  1. Bellcross
    Member
    Posted 1 year ago #

    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.

    Thanks

    http://wordpress.org/extend/plugins/pg-simple-affiliate-shop/

  2. PeoplesGeek
    Member
    Plugin Author

    Posted 1 year ago #

    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.

    Cheers,
    Brian (PeoplesGeek)

  3. PeoplesGeek
    Member
    Plugin Author

    Posted 5 months ago #

    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

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic