Featured image and files not showing.

This topic contains 8 reply and 2 voices, and was last updated by Mahi 10 years, 10 months ago
Viewing 8 Posts - 1 through 8 (of 8 total)
Author Posts
June 28, 2013 at 8:10 am 5365
Mahi Hi, In my theme is a setting to display images in the post when post is open, this setting is on the wpuf create form page, but the featured images a not shown in post submitted with the wpuf form. So instead I used upload image (had another plugin set images in post as featured) and checked "show files in post", this worked fine. But then I realized wpuf made my plugin wp symposium not working, so I want to only load wpuf on the form-pages, but then the post are no longer showing images and files in the post. I have entered the snippet $images = get_post_meta( $post->ID, 'mey_key_name' ); if ($images) { foreach ($images as $attachment_id) { $thumb = wp_get_attachment_image( $attachment_id, 'thumbnail' ); $full_size = wp_get_attachment_url( $attachment_id ); printf( '%s', $full_size, $thumb ); } } In my themes css file with no result (tried with imagesize set to both full and thumbnail), is the snippet surposed to go somewhere else? Thank you Esben
June 28, 2013 at 8:15 am 5366
Mahi Mahi

are you using correct meta_key name ?
Also, if your theme shows WordPress default featured image then, wpuf featured image should works fine as its same.

June 28, 2013 at 8:33 am 5367
esbensylvest@gmail.com esbensylvest@gmail.com

My theme does show default featured image but it is not working.

What would be example of meta_key name?

Thank you

June 28, 2013 at 8:38 am 5368
Mahi Mahi

check this tutorial.

and check image bellow:

meta key is : image_upload

June 28, 2013 at 9:02 am 5369
esbensylvest@gmail.com esbensylvest@gmail.com

I am sorry but I cant get it to work, so if my meta_key for upload image is “billede” should the snippet then still go like this?:

$images = get_post_meta( $post->ID, ‘billede’ );

if ( $images ) {
foreach ( $images as $attachment_id ) {
$thumb = wp_get_attachment_image( $attachment_id, ‘thumbnail’ );
$full_size = wp_get_attachment_url( $attachment_id );

printf( ‘%s‘, $full_size, $thumb );
}
}

Or should I change anything every word “thumbnail” to image or something else?

June 28, 2013 at 9:47 am 5372
esbensylvest@gmail.com esbensylvest@gmail.com

Hi again,

I have tried every combination I can think of is the snippet maybe not surposed to go in css-file but in some other file?

June 28, 2013 at 10:09 am 5373
Mahi Mahi

If you are using the right meta_key but still its not showing then must be your theme functions overwriting something.

can you check it with default theme ? or want us to check it please provide url/login details.

reply as private please.

June 28, 2013 at 11:08 am 5376
esbensylvest@gmail.com esbensylvest@gmail.com This reply has been marked as private.
June 29, 2013 at 12:43 am 5402
Mahi Mahi

hi mate,

Sorry for late reply. I tested it seems like something wrong with theme’s file.

Should be your theme’s single.php file. If you post from regular backend post area even though your theme doesn’t show any feature image or anything. So, nothing much we can do here.

in order to show featured image,uploaded images and files you need to edit your template file.

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