The MU forums have moved to WordPress.org

Last updated code please !!! (8 posts)

  1. Ste_000
    Member
    Posted 18 years ago #

    I need the code to display the last updated blog....in others topics there are some code but don't work or dipslay errors ! help me please tnk

  2. fimion
    Member
    Posted 18 years ago #

    i've posted a possible solution here

  3. ladyramses
    Inactive
    Posted 18 years ago #

    <?php

    switch( $_GET[ 'action' ] ) {
    default:
    // gets last updated
    $blogs = get_last_updated();
    print "<h3>Latest updated</h3><br><br>
    ".$blogs."
    ";

    }

    ?>

  4. Ste_000
    Member
    Posted 18 years ago #

    thanks but i need to paste the code in a simply php page and not in the wpmu site. Fimion, can i include the php file in an other page php? thanks again

  5. ergate
    Member
    Posted 18 years ago #

    If I am not mistaken the above code should work in a stand-alone php page, assuming you throw in the appropriate WP header onto each page that you create.

    As a side note, I tried to use the code listed above. When I did the only thing that printed from this code was

    Latest updated

    Array

    the rest of the page printed just fine, only nothing but array from the code.
    Did I miss something when trying this?

  6. Ste_000
    Member
    Posted 18 years ago #

    i try the fimion code in a stand-alone php page and i obtain the same error of ergate...

    Latest Update
    Array

    ....

  7. fimion
    Member
    Posted 18 years ago #

    the function "get_last_updated()" returns an array containing information about the last updated blogs. you'll have to go through that array, and output what you want.

  8. Ste_000
    Member
    Posted 18 years ago #

    ah ok thanks :D

About this Topic