• hey there,l

    is there a plug in or mod or an easy way to extract the latest posts section from WP and insert it into another part of the site that is not part of the WP install?

    Thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • this has only been asked and answered in one variation or another 10,000 times. PLEASE use the search.

    https://www.ads-software.com/search/display+posts+on+non+wordpress+page?forums=1

    Thread Starter Prellyan

    (@prellyan)

    thanks for that but how do i set the class format in the syntax

    <?php
    $how_many=5; //How many posts do you want to show
    require_once(‘thewateringcan/wp-config.php’); // Change this for your path to wp-config.php file ?>
    <ol id=”whats-new”>
    <?
    $news=$wpdb->get_results(“SELECT ID,post_title FROM $wpdb->posts
    WHERE post_type=\”post\” AND post_status=\”publish\” ORDER BY post_date DESC LIMIT $how_many”);
    foreach($news as $np){
    printf (”

    “, get_permalink($np->ID),$np->post_title);
    } ?>

    i have a text class called “whitebodytext” where do i put that code in order to make the hyperlink formated with it?

    Thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Feed from database into external page’ is closed to new replies.