Up to 50 percent off

wp_functions and adding image post

This topic contains 7 reply and 2 voices, and was last updated by Tareq Hasan 10 years, 9 months ago
Viewing 7 Posts - 1 through 7 (of 7 total)
Author Posts
February 20, 2014 at 2:47 am 15675
Tareq Hasan 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'] : '',
February 20, 2014 at 2:49 am 15676
amelaunsworth amelaunsworth

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'}"
February 20, 2014 at 2:55 am 15681
Tareq Hasan Tareq Hasan

Have you checked out this? http://docs.wedevs.com/showing-meta-fields-in-frontend/

February 20, 2014 at 3:12 am 15682
amelaunsworth amelaunsworth

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’] : ”,

February 20, 2014 at 3:23 am 15683
amelaunsworth amelaunsworth

check out my profile page.

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

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

February 20, 2014 at 5:29 am 15686
amelaunsworth amelaunsworth

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.

February 20, 2014 at 9:31 pm 15698
amelaunsworth amelaunsworth

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?

February 21, 2014 at 1:26 am 15702
Tareq Hasan Tareq Hasan

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

Viewing 7 Posts - 1 through 7 (of 7 total)