Support » Fixing WordPress » Trying to Setup Recent Post box within template

  • I have the following code and should post recent posts on homepage but it is not working, can someone see what is the issue.

    $my_query = new WP_Query( );
    echo "\r\n\r\r\n";
    while ($my_query->have_posts())
        $my_query->the_post( );
        echo "\r\n\r\r\n<p>";
        the_content_rss( "", TRUE, "", 20 );
        echo "</p>\r\r\n\r\r\n<p><a href=\"";
        the_permalink( );
        echo "\">";
        $news1 = get_option( "stylewp_news1" );
        echo $news1;
        echo " &raquo;</a></p>\r\r\n\r\r\n";
    echo "\r\n\r\r\n<div style=\"border-bottom:1px dotted #cccccc; margin-bottom:5px; padding:0px 0px 0px 0px; clear:both;\"></div>\r\r\n\r\r\n";
  • The topic ‘Trying to Setup Recent Post box within template’ is closed to new replies.