image link using input from a custom field/metabox (3 posts)

  1. jeppeandersen
    Posted 3 years ago #

    I would like to make a image link using URL information from a custom field/ metabox. The custom field came along with a plugin (cart66 lite) for the theme. The custom field contain a textarea where the URL is located (URL information is imported into the field using wp ultimate CSV importer). The URL is changing according to the custom post (which it should).

    I have two problems, one that I want to display this URL as a image link without having to manually insert code in the custom field to all the posts (want it there as default).

    another problem I have encountered is the url information.
    Normally I would just use something like this:

    (a href="http://www.espn.com")
    (img src="http://www.tizag.com/pics/htmlT/sunset.gif" /)

    (would use <> instead of ())

    but since the link is different for every post I can´t really use the link directly (only manually) and haven´t found any php code that could help solve the problem.

    I dont have a lot of experience when it comes to php code but think I will be able to handle the basics. I would like to upload a picture on this post but cant find a way to do it. just ask if you need more information.

    any answer is greatly appreciated

  2. jeppeandersen
    Posted 3 years ago #

  3. jeppeandersen
    Posted 3 years ago #

    the code I am using for generating the link is:

    (a href=\"<?php echo get_post_meta($post->ID, 'w2f_cartcode',true); ?>\"(tagtest)/a)

    (would use <> instead of ())

Topic Closed

This topic has been closed to new replies.

About this Topic