Display most recent posts on static homepage -no content
-
Hello!
I am making a static homepage and I want to display my posts in the static homepage. This is the code I am using.
<!-- start content --> <div id="content"> <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> <div class="post" id="post-<?php the_ID(); ?>"> <?php global $post; $myposts = get_posts('numberposts=1&category=1'); foreach($myposts as $post) : ?> <h1 class="kop_home"><?php the_title(); ?></h1> <div class="entry"> <?php the_content('Read the rest of this entry »'); ?> </div> <?php endforeach; ?> <?php endwhile; else: ?> <p><?php _e('Sorry, no posts matched your criteria.'); ?></p> <?php endif; ?> </div> <!-- end content -->
I made two pages; one homepage and one blogpage. The post is visible on the homepage, but it is only the title that is show. There is no content! I do not know how to solve this!
HelP!
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Display most recent posts on static homepage -no content’ is closed to new replies.