Forums

Displaying custom field thumbnails outside wordpress. (4 posts)

  1. Noobsimon
    Member
    Posted 1 year ago #

    Hello,

    I am a noob but i am really stuck with something.

    i want to display the custom field thumbs on a website outside the blog is this possible? How can we do this i managed to get this far with the other fields descript etc etc they work but not the thumb:

    $dbh = mysql_query("select wp_posts.post_title as movie, wp_posts.post_content as details from wp_posts where wp_posts.ID=$id and wp_posts.post_status='publish'");

    if(mysql_num_rows($dbh)>0){
    while($result=mysql_fetch_array($dbh)){
    $movie = str_replace('"','',$result['movie']);
    $desc = substr(strip_tags($result['details']) ,0,250);
    $thumb = ????????

    What do i fill in next to thumbs? On my blog i normally use:

    <img src="<?php $key="thumbnail"; echo get_post_meta($post->ID, $key, true); ?>" alt="<?php the_title() ?>" />

    Please please help this humble noob...

  2. Noobsimon
    Member
    Posted 1 year ago #

    nobody... ?

  3. GiveMeCoffee
    Member
    Posted 1 year ago #

    Has anyone figured out how to do this?

  4. fonglh
    Member
    Posted 1 year ago #

    custom fields are stored in wp_postmeta. Look it up by post_id.

Topic Closed

This topic has been closed to new replies.

About this Topic