Home Forums Plugin Support WP User Frontend Pro wp_functions and adding image post

This topic is: not resolved

This topic contains 7 replies, has 2 voices, and was last updated by  Tareq Hasan 5 years, 4 months ago.

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #15675

    amelaunsworth
    Participant
    Post count: 27

    hi there,
    i added a bunch of functions in the wpuf_functions.php file so that your forms work on my site. i am currently using an image upload on one of my forms and don't know how to display the image on my items page.

    i added the following code, but i know this is wrong. can you help?

    ‘first_photo' => isset( $_POST[‘first_photo'] ) ? $_POST[‘first_photo'] : ”,

    #15676

    amelaunsworth
    Participant
    Post count: 27

    and this is the code on the items page:

       if (!empty($options['first_photo']))
       img src="{timthumb src => $post->first_photo, w => 120, h => 160}" alt="{__ 'Item image'}"
    #15681

    Tareq Hasan
    Keymaster
    Post count: 2831
    #15682

    amelaunsworth
    Participant
    Post count: 27

    thanks for the link.

    i posted:

    $images = get_post_meta( $post->ID, ‘mey_key_name' )

    if i post the entire code that is on that page, i get an error and my page doesn't show up at all.

    and i'm not sure if it's working. when i check my admin, i see my image posted under the custom fields area, but not under the main item area. maybe because i added the wrong code in the wpuf_fuctions.php page? under the main item area i don't see an image, but i see thte text ‘first_photo' (all my fields are duplicated in the admin because of the custom field types). i don't know how to show the image instead of the text first_photo.

    ‘first_photo' => isset( $_POST[‘first_photo'] ) ? $_POST[‘first_photo'] : ”,

    #15683

    amelaunsworth
    Participant
    Post count: 27

    check out my profile page.

    http://www.godurhamregion.com/item/test-company-3/

    the code from the documentation page shows up and no image.

    #15686

    amelaunsworth
    Participant
    Post count: 27

    i had to remove the code from the documentation because my site is live.
    but basically the code from the documentation is what showed up instead of my image.

    #15698

    amelaunsworth
    Participant
    Post count: 27

    hi taraq,
    i would really appreciate your help on this. i was able to add the image upload to a form. the code you provide in the documentation doesn't work. it just displays the code.
    i also know i have to add a function in the wpuf_functions.php page so that the image upload/modify option appears in my admin for an item. can you assist me with this?

    #15702

    Tareq Hasan
    Keymaster
    Post count: 2831

    May be you had some wrong characters in your code. Try this one http://pastie.org/8752996

Viewing 8 posts - 1 through 8 (of 8 total)

The topic ‘wp_functions and adding image post’ is closed to new replies.