WordPress.org

Ready to get started?Download WordPress

Forums

image not displaying through custom field (4 posts)

  1. preitybansal
    Member
    Posted 1 year ago #

    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() then my image was displayed.

    Now I was trying to get the image through custom field but nothing works.
    Is this concatenation problem or what? And is there any other solution to display images rather then bloginfo()??

    Please help..

  2. alchymyth
    The Sweeper & Moderator
    Posted 1 year ago #

    please post details:

    - the content of the custom field?
    - the code used to output the image?
    - what is the resulting output in your site?
    - a link to your site to illustrate your problem?

  3. preitybansal
    Member
    Posted 1 year ago #

    The field name is product-image and the value I am giving is product-images/prod-sprocketizer.png.

    product-images is a folder that contains the image file and its in the same directory where other files home.php, index.php and product-page.php(template for this page)exists..

    The site url is http://acheiver.netne.net/here/store/sprockets/mega-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..

  4. preitybansal
    Member
    Posted 1 year ago #

    Hi,

    Havent been able to solve the problem yet.. It is still unresolved.

    Any help will be appreciated..

Topic Closed

This topic has been closed to new replies.

About this Topic