Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi bookworm480,

    I’m not 100% clear on what you’re after but it sounds like you might be able to use the shortcode option to achieve this.

    At a minimum here’s what you need for the shortcode:
    [thirstylink linkid=”123″ linktext=”the text you want to link”]

    Where 123 is the ID of your affiliate link and you can replace the text with whatever you like.

    Thread Starter bookworm480

    (@bookworm480)

    i want to put it in the attachment.php in place of the full image url. is there a way to attach the affiliate to each post?

    right now i added a custom url in the media library its a pain pasting all the same url in each pic field

    in attachment.php
    <div class="attachment-image"><a href="[code+id]"><img src="<?php echo wp_get_attachment_url(); ?>" alt="<?php the_title_attribute(); ?>" /></a></div>

    It’s a bit hard to know exactly what you’re trying to achieve without more context, but you could, in place of [code+id] in your code above, try something like:

    get_post_permalink($id);

    Where $id is the ID of your desired affiliate link.

    Thread Starter bookworm480

    (@bookworm480)

    im uploading food images when someone clicks the pic not the thumb they go to my affiliate link emailed you the demo

    Responded via email, closing off this thread…

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘can i use one code’ is closed to new replies.