Any update on Skimlinks integration? Anyone have a PHP solution?

  • Glenn
    Newbie 12 points
    September 16, 2016 at 4:12 am

    Does anyone know if there has been any update on getting Skimlinks to integrate with the Coupon Theme?

    I’d rather apply some PHP than have to individually add the affiliate link to every one of my 5000+ posts. So I’d be super grateful if anyone has come up with a solution.

    It used to work but Mark mentioned back in 2013 there were some issues in integrating it into the new Theme version.

    Mark/Anyone have an update or a solution for this?

  • Stephen
    Newbie 34 points
    November 13, 2016 at 11:04 pm

    Here’s a snippet of how I do it when retrieving my CSV from CJ / LinkShare / PepperJam. This snippet is from our CJ code.

    // temporarily run through skimlinks

    $skimlinks = “”;

    // fields to write and append before writing our CSV

    ‘post_author’ => 1,
    ‘post_date’ => date(‘Y-m-d H:i:s’, strtotime($column[‘promotionstartdate’])),
    ‘post_content’ => str_replace($searchArray, $replaceArray, $column[‘description’]),
    ‘post_title’ => str_replace($searchArray, $replaceArray, $column[‘advertiser’]),
    ‘post_excerpt’ => str_replace($searchArray, $replaceArray, $column[‘name’]),
    ‘post_type’ => $coupontype,
    ‘category’ => $category,
    ‘code’ => (!empty($code[1])) ? $code[1] : $nocode,
    ‘expires’ => date(‘Y-m-d H:i:s’, strtotime($column[‘promotionenddate’])),
    ‘expiry_date’ => date(‘Y-m-d H:i:s’, strtotime($column[‘promotionenddate’])),
    ‘featured’ => ‘no’,
    ‘image’ => $imageUrl,
    ‘link’ => $skimlinks.$column[‘trackingurl’].$ref,
    ‘store’ => $column[‘advertiser’],
    ‘type’ => ($column[‘promotiontype’] == ‘Sale/Discount’) ? ‘Offer’ : ‘Coupon’,
    ‘url’ => $skimlinks.$column[‘trackingurl’].$ref

    So if you are importing via CSV you could read in the CSV, re-write the appropriate urls to have them pass throuogh Skimlinks and you would be golden.

    Questions, drop me a message.

Viewing 2 posts - 1 through 2 (of 2 total)

New Business Themes for WordPress 2020

Start your new website today!

View Business Themes