Adding WordPress Post with Images to PHP webpage
-
<?php
// Include WordPress
define(‘WP_USE_THEMES’, false);
require(‘./news/wp-blog-header.php’);
?>Followed by
<?php query_posts(‘showposts=3&cat=14’); ?>
<?php while (have_posts()): the_post(); ?>elsewhere in the page to make the posts come up.
I use this to then place wordpress posts on my PHP homepage, but I would like to step it up and add an image for the post. Like grab the first wordpress image associated with the post and use it as a thumbnail.
Is this possible?
The topic ‘Adding WordPress Post with Images to PHP webpage’ is closed to new replies.