Title: lb9's Replies | WordPress.org

---

# lb9

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

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

 Search replies:

## Forum Replies Created

Viewing 1 replies (of 1 total)

 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Calling wordpress from within a function](https://wordpress.org/support/topic/calling-wordpress-from-within-a-function/)
 *  [lb9](https://wordpress.org/support/users/lb9/)
 * (@lb9)
 * [20 years, 3 months ago](https://wordpress.org/support/topic/calling-wordpress-from-within-a-function/#post-256361)
 * I saw the wordpress mu link and that would definitely do the trick, but I already
   started with the regular version of wordpress. Do you know if I can safely upgrade
   from wordpress 1.5 to wordpressmu and keep my posts and all of the coding I worked
   so hard to create in tact? I dont want to have to do all of that work again and
   if I could just use a simple echo function that would work (ie, allow me to include
   my posts on a separate webpage that was already created and resides outside the
   blog folder and main page), that would be great. I was thinking something more
   along the lines of this code I saw in another post:
 * <?php define(‘WP_USE_THEMES’, false);
    require(‘./wp-blog-header.php’); get_header();?
   > <div id=”content” class=”narrowcolumn”><h1 style=”color:#000;”>Welcome to my
   site</h1> Hello and welcome to my site. You can go to my web page about how to
   improve your shoots with your digital camera; or you can go to my blog <h2>Lastest
   posts in my blog:</h2><?php # Here starts Mini Loop trick: You can use this code,
   but _at your own risk_ # If you want to improve this code, you’re welcome 😉 
   $how_many=7; //How many posts do you want to show ?> <ul class=”whats-new”> <?
   $news=$wpdb->get_results(“SELECT ID,post_title FROM $wpdb->posts WHERE post_status
   = \”publish\” ORDER BY ID DESC LIMIT “.$how_many); foreach($news as $np){ printf(”
    - 
    - “, $np->ID,$np>post_title);
      }?></div><?php get_sidebar(); get_footer(); ?>
    - I tried it but also produces ‘Fatal error: Call to a member function on a 
      non-object’ output error. I think there may be something wrong in the syntax
      but seems like it should work otherwise.

Viewing 1 replies (of 1 total)