Get title and image of a post, in a html page out of WP
-
In WP if you want to get the recent post previews in a html page out of WP, just have to use this code:
// Include the wp-load'er include('../root/wp/wp-load.php'); // Load the recent top 3 posts query_posts( posts_per_page=3 ); <div id="blogPosts"> <ul id="blogList"> <?php if (have_posts()) : ?> <?php while (have_posts()) : the_post(); ?> <li id="posts"> <a href="<?php the_permalink() ?>" target="_parent"><?php the_post_thumbnail(array(70,auto), array ('class' => 'alignleft')); ?></a><br/> <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>" target="_parent"> <?php the_title(); ?></a><br/> <span style="font-style:italic; font-size:11px;">Date: <?php the_time('F jS, Y') ?></span> </li> <?php endwhile; ?> <?php endif; ?> </ul> </div>
But when I install qTranslate-x the code stop working, instead display the recent post, all the page appears in the frame…
Someone knows how to get the title, permalink, and image out of WP, in a html page
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Get title and image of a post, in a html page out of WP’ is closed to new replies.