WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] How to add affiliate code to template (6 posts)

  1. Lawrence
    Member
    Posted 5 years ago #

    Theme: Thesis 1.5

    How do I add affiliate code to the template. Shoot, I don't even know for sure what the template is or where and how to get into it.

    The affiliate I want to add is the Amazon Associates and the code string is obviously their from them.

    I just saw an update in my blog's basic WordPress information area for Custom Field Template. Is that what I should get to install the code with or through--I haven't read all the information supplied wth the Custom Field Template update?

    Thank you very much for your help.

  2. stvwlf
    Member
    Posted 5 years ago #

    Hi

    It depends where on your page you want the code to display. If you want it within a post, you add it to each post in the post editor.

    If you want it in the sidebar and are not code-savvy, you can use a text widget (Admin - Appearances button left column - widgets)

    Otherwise you modify a template file and paste the code in there. Your theme's files are in /wp-content/themes/{themename}/

    To add to the sidebar edit sidebar.php. To add to the footer, edit footer.php. To add between each post, edit index.php. To add to the single post page (the page on which comments display) edit single.php

  3. Lawrence
    Member
    Posted 5 years ago #

    How do I add it in the post editor? It is code from the Amazon affiliate program. this is the Omakase link code. They call it the "Leave it up to us!" They explain, "Omakase links show your site visitors what they're most likely to buy based on Amazon's unique understanding of your site, the visitor, and the page itself." That is the functionality that I need.

    I believe this code is java script (JS). I tried adding the java to the bottom of a post in the post editor and that makes it barf, as one tech type puts it.

  4. stvwlf
    Member
    Posted 5 years ago #

    install this plugin
    http://wordpress.org/extend/plugins/custom-fields-shortcode/

    add the javascript code to a custom field, in the area below the post edit window on the post edit page

    read the plugin instructions for how to insert the custom field you just created into your post

  5. Lawrence
    Member
    Posted 5 years ago #

    Thanks for your help.

    Cheers,

    Lawrence

  6. Lawrence
    Member
    Posted 5 years ago #

    I do not trust the plugin offered above. Hope to find another plugin or learn otherwise how do I add affiliate code to the template.

Topic Closed

This topic has been closed to new replies.

About this Topic