Posting a blog post's Thumbnail Image outside of Wordpress install folder

Discussion in 'PHP' started by Nima, Nov 20, 2011.

  1. #1
    I'm using the following code to pull the blog posts outside the blog install

    
    ?php
    require('/home/USERNAME/public_html/blog/wp-blog-header.php');
    ?>
    <?php query_posts('showposts=5'); ?>
    <?php while (have_posts()) : the_post(); ?>
    <h3><a href="<?php the_permalink() ?>" rel="bookmark" title="Read The Entire Post"><?php the_title(); ?></a></h3>
    <p><?php the_excerpt(); ?></p>
    <?php endwhile;?>
    
    
    Code (markup):
    I want to also pull the thumbnail image out of wordpress too. How can i do that?

    Thanks
     
    Nima, Nov 20, 2011 IP
  2. ashishkg

    ashishkg Active Member

    Messages:
    233
    Likes Received:
    8
    Best Answers:
    3
    Trophy Points:
    68
    #2
    So, thumnail image was use use as a custom field, please confim this
     
    ashishkg, Nov 21, 2011 IP
  3. Nima

    Nima Well-Known Member

    Messages:
    3,489
    Likes Received:
    243
    Best Answers:
    0
    Trophy Points:
    175
    #3
    Yes, the thumbnail image is a custom field. (Thanks for the help)
     
    Nima, Nov 21, 2011 IP
  4. Nima

    Nima Well-Known Member

    Messages:
    3,489
    Likes Received:
    243
    Best Answers:
    0
    Trophy Points:
    175
    #4
    Someone at a different forum gave me the answer so I thought to post it here for anyone else that might come across this thread:

    
    $post_image = thesis_post_image_info('thumb');
    echo $post_image['output'];
    
    Code (markup):
     
    Nima, Nov 21, 2011 IP