How to Make Affiliate Link for Specific Page

Hello, let me first clarify that this is NOT a question on how to use the shortcode.

Rather, I just want to know how to manually make an affiliate link. We have it set up so the affiliate link is http://example.com?affiliates=1 . Can I just do http://example.com/shop/cool-product?affiliates=1 ? If not, will you please advise?

Posted in

Comments

One response to “How to Make Affiliate Link for Specific Page”

  1. Hi,
    You could use:
    [affiliates_url]http://example.com/shop/cool-product[/affiliates_url]
    if you need to generate it manually:

    $output = "";
    $aff_id = Affiliates_Affiliate_WordPress::get_user_affiliate_id();
    if ( $aff_id ) {
    $output = "http://example.com/shop/cool-product?affiliates=" . $aff_id;
    }
    echo $output;

    cheers

Share