The MU forums have moved to WordPress.org

how to display latest blogs on my site (7 posts)

  1. sribharath
    Member
    Posted 14 years ago #

    hello friends...

    as ia m very new to php i dont have that much knowledge in doing subsstitutes and all...wht i want to ask is i have installed wordpress at http://blogs.karomasti.com and i want to display latest blogs in my main index page i.e.., on http://karomasti.com

    usually we use

    "<?php foreach( $blogs as $details ) {
    ?>

  2. <a href="http://<?php echo

    $details[ 'domain' ] . $details[ 'path' ] ?>"><?php echo

    get_blog_option( $details[ 'blog_id' ], 'blogname' )

    ?>

  3. <?php
    }
    ?>

    <?php
    }
    ?>" for displaying latest blogs with in the same directory....so wht changes should i make to the code to disply the same on my index page

  • Klark0
    Member
    Posted 14 years ago #

    There's a dozen ways to do this. Search for recent posts.

    Personally I use Donncha's Sitewide Tags plugin since I use it for other things as well. Less plugins the better.

  • andrea_r
    Moderator
    Posted 14 years ago #

    He wants to display the list outside of MU.

  • sribharath
    Member
    Posted 14 years ago #

    Exactly andrea_r..u r right..i want to display it outside MU...and i know how to display it inside the MU...But please help me to do it outside...

  • sribharath
    Member
    Posted 13 years ago #

    is any one there to solve my problem buddies

  • swee
    Member
    Posted 13 years ago #

    Hi all,

    I'm also facing this problem. I want my main page (e.g http://www.example.com) to able to display numbers of Latest Post, Most Commented, and Most View. Please refer to this example website http://fun.omy.sg/blog/.

    Can i know how to do this? By RSS feed? And can i do this if my main page is using asp.net rather than php?

    I've found this information http://www.corvidworks.com/articles/easy-feed-reading-with-simplepie, but not sure how does it work.

    Thanks and sorry for my poor English.

  • SimonJ
    Member
    Posted 13 years ago #

    To use any wordpress functions outside the installation :

    [1] Make a php file outside of wordpress. Let's say wathever.com/my_non_wp_index.php

    [2]At the top of this file, use this code :

    <?php
    require_once('wp-blog-header.php');
    require_once('wp-settings.php');
    ?>

    [3] If your wp installation is in a sub directory, adjust this code to point the correct path (ex blog/wp-blog-header.php)

    [4] Then, you will be able to use any wp functions in this page, including those in functions.php of your theme directory.

    S.

  • About this Topic