Home Forums Plugin Support WP User Frontend Pro Featured image and files not showing.

This topic is: not resolved

This topic contains 8 replies, has 2 voices, and was last updated by  Mahi 5 years, 11 months ago.

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #5365

    esbensylvest@gmail.com
    Participant
    Post count: 4

    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

    #5366

    Mahi
    Member
    Post count: 1555

    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.

    #5367

    esbensylvest@gmail.com
    Participant
    Post count: 4

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

    What would be example of meta_key name?

    Thank you

    #5368

    Mahi
    Member
    Post count: 1555

    check this tutorial.

    and check image bellow:

    meta key is : image_upload

    #5369

    esbensylvest@gmail.com
    Participant
    Post count: 4

    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?

    #5372

    esbensylvest@gmail.com
    Participant
    Post count: 4

    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?

    #5373

    Mahi
    Member
    Post count: 1555

    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.

    #5376

    esbensylvest@gmail.com
    Participant
    Post count: 4
    This reply has been marked as private.
    #5402

    Mahi
    Member
    Post count: 1555

    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 9 posts - 1 through 9 (of 9 total)

The topic ‘Featured image and files not showing.’ is closed to new replies.