Support » Themes and Templates » Static Frontpage

  • Hello everybody, i wanna static frontpage wich shows only 1 or 2 posts. Can you please give me an example what do i have do in home.php?
    I found this one but it shows only links.

    <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>

    # 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=2; //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 (”

  • %s
  • “, $np->ID,$np->post_title);


    Thank you very much.

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Static Frontpage’ is closed to new replies.