Title: world's Replies | WordPress.org

---

# world

  [  ](https://wordpress.org/support/users/world/)

 *   [Profile](https://wordpress.org/support/users/world/)
 *   [Topics Started](https://wordpress.org/support/users/world/topics/)
 *   [Replies Created](https://wordpress.org/support/users/world/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/world/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/world/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/world/engagements/)
 *   [Favorites](https://wordpress.org/support/users/world/favorites/)

 Search replies:

## Forum Replies Created

Viewing 5 replies - 1 through 5 (of 5 total)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [The PHP code for the last 5 posts](https://wordpress.org/support/topic/the-php-code-for-the-last-5-posts/)
 *  [world](https://wordpress.org/support/users/world/)
 * (@world)
 * [19 years, 11 months ago](https://wordpress.org/support/topic/the-php-code-for-the-last-5-posts/page/5/#post-393860)
 * Thanks a lot, Geoffe.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [The PHP code for the last 5 posts](https://wordpress.org/support/topic/the-php-code-for-the-last-5-posts/)
 *  [world](https://wordpress.org/support/users/world/)
 * (@world)
 * [19 years, 11 months ago](https://wordpress.org/support/topic/the-php-code-for-the-last-5-posts/page/5/#post-393857)
 * Sorry folks, I have to reopen this thread:
 * My problem as an absolute PHP-newbie is, that I can’t get anything posted here
   to work.
 * I guess this is because i try to call the db from a (home)page outside of wp,
   which itself has been added to the site later and is installed in a subdirectory
   named ‘blog’.
 * I should be able to call the wpdb from outside of WordPress, right? My table-
   prefix is ‘wpde01_’.
 * I only want the last post being displayed with headline and excerpt and linked
   via the page-slug. Unfortunately the excerpt has to be shortened, too, so using
   RSS isn’t an option.
 * Any nice person around willing to support a newbie?
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [displaying links to newest blog articles on external page](https://wordpress.org/support/topic/displaying-links-to-newest-blog-articles-on-external-page/)
 *  Thread Starter [world](https://wordpress.org/support/users/world/)
 * (@world)
 * [19 years, 11 months ago](https://wordpress.org/support/topic/displaying-links-to-newest-blog-articles-on-external-page/#post-402367)
 * Thank you very much for the hint!
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [displaying links to newest blog articles on external page](https://wordpress.org/support/topic/displaying-links-to-newest-blog-articles-on-external-page/)
 *  Thread Starter [world](https://wordpress.org/support/users/world/)
 * (@world)
 * [19 years, 11 months ago](https://wordpress.org/support/topic/displaying-links-to-newest-blog-articles-on-external-page/#post-402303)
 * sorry, please ignore `$do_not_duplicate = $post->ID;`
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [displaying links to newest blog articles on external page](https://wordpress.org/support/topic/displaying-links-to-newest-blog-articles-on-external-page/)
 *  Thread Starter [world](https://wordpress.org/support/users/world/)
 * (@world)
 * [19 years, 11 months ago](https://wordpress.org/support/topic/displaying-links-to-newest-blog-articles-on-external-page/#post-402301)
 * Thanks for that link. I read as much as i found and came up with the following
   solution, which results in an empty page. Without that code the page is rendered
   fine and all phpincludes are rendered, too
 * Btw. WordPress is running in a subdirectory, might this be the problem? I don’t
   know how to pass parameters to WordPress from an external page.
 * Anyway, here’s what I came up with:
 * `
    <p class="tease">
 * <!-- loop -->
    <?php if ( have_posts() ) : while ( have_posts() ) : the_post();?
   >
 * <!-- no styling -->
    <?php define('WP_USE_THEMES', false); >
 *  <!-- display last post once -->
    <?php $my_query = new WP_Query('category_name
   =general&showposts=1'); while ($my_query->have_posts()) : $my_query->the_post();
   $do_not_duplicate = $post->ID; ?>
 * <!-- create linked text, styled title -->
    <a href="blog/<?php the_permalink();?
   >" <span class="subheadsmall"> <?php the_title(); ?> </span><br> <?php the_excerpt();?
   > </a>
 * <!-- loop end -->
    <?php endwhile; ?> <?php endif; ?> </p>
 * Any hint on how to fix this code or accompülish this task will definitely raise
   your spam karma ;o)
 * [I guess calling WordPress from the outside could be a reoccuring problem, therefore
   an article in the codex would probably make sense, too.]

Viewing 5 replies - 1 through 5 (of 5 total)