Hi, I am having a lot of trouble displaying posts from a specific category on a page. I want to make a blog page, but only have posts from the blog category to show. I have used this code, which shows the category titles but not the content: <?php global $post; $myposts = get_posts('numberposts=5&offset=1&category=13'); foreach($myposts as $post) : ?> <li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li> <?php endforeach; ?> Does anyone know how I can adapt/add to this code so the full post content shoes please? I have asked this question before and people have sent me links about "the loop" but I didn't really understand it :S Thank you
Try this code: <?php global $post; $myposts = get_posts('numberposts=5&offset=1&category=13'); foreach($myposts as $post) : ?> <li> <a href="<?php echo(get_permalink($post->ID)); ?>"><?php echo($post->post_title); ?></a> <p><?php echo($post->post_content); ?></p> </li> <?php endforeach; ?> PHP: