• This code snippet was marked as incomplete but I want to have this work on my WPtube3 theme I’m using with the video swiper plugin activated. The tube theme from freewptube has a thumb custom field function but the videoswiper plugin overrides the field “thumb” if created in the post.conflicting custom fields? I’m not sure why. I’m new I guess.

    I thought this snippet might help but I don’t know where to put it.
    or if it will work. If anyone can tell me a solution or how to use this code I would appreciate it.
    <?php

    function prefix_get_image_thumb($post_id) {

    global $wpdb;

    $attachment_id = $wpdb->get_var(“SELECT ID FROM $wpdb->posts WHERE post_parent = ‘$post_id’ AND post_status = ‘inherit’ AND post_type=’attachment’ ORDER BY post_date DESC LIMIT 1”);

    $thumb = get_attachment_icon($attachment_id);

    echo $thumb;

    }

    ?>

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter moonfu

    (@moonfu)

    Any ideas? I’m just needing a simple answer so I can try it out.

    If it’s to vague of a post just let me know.

    thanks

    Thread Starter moonfu

    (@moonfu)

    Is this thing on?

    Yes. Yes it is.

    This is a forum. It is not an Instant Messenger. You may have to wait a day or two for an answer.

    I’m not good at php and I don’t know your theme so I can’t help.

    I find it easiest to subscribe to rss feeds here so I can see when people post answers to my questions.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Where do I put this snippet I found.’ is closed to new replies.