SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Hybrid View

  1. #1
    SitePoint Member
    Join Date
    Oct 2012
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Image not displaying through custom field in wordpress

    Hi,

    I was trying to customize my theme and got the following problem..
    The image was not displaying on the homepage in <img> tag even after getting the correct and full path of the image. But then I tried using bloginfo('template_directory') then my image was displayed. The code I used was <?php bloginfo('template_directory');?>/product-images/prod-sprunkler.png" /> where product-images is the folder which contain the image named prod-sprunkler.png.

    Now I was trying to get the image through custom field that is I have stored "/product-images/prod-sprunkler.png" in the custom field known as product_image.
    So when I am concatenating these two functions to get the full path I am not getting the desired output and the image is also not displayed.
    Is this concatenation problem or what? And is there any other solution to display images rather then bloginfo()??

    The site url is http://acheiver.netne.net/here/store...-sprocketizer/

    The output is I am not getting any image even after trying all possible combinations...

    I want to retrieve the field like I have done for price, dimensions and product-code..(all 3 are custom fields).

    I have used get_post_meta() for retreiveing the fields..

    please help..

  2. #2
    SitePoint Member
    Join Date
    Oct 2012
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    No one to reply or help here??!!!

  3. #3
    Mazel tov! bronze trophy kohoutek's Avatar
    Join Date
    Aug 2004
    Location
    Hamburg, Germany
    Posts
    4,248
    Mentioned
    30 Post(s)
    Tagged
    0 Thread(s)
    Can you show the full line of code for your custom field from the php file?
    Maleika E. A. | Rockatee | Twitter | Dribbble




Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •