I’m trying to customize a WP installation for a pro-bono client and had a question about my one-off homepage…
What I’m trying to do is display the most recent post (1 only), followed by the title and content of a “page”.
I had installed the “Get-A-Post” plug-in, but it turned out to be the culprit in crashing my admin section whenever i would edit anything!
here’s the code I have so far:
<div id="inside_content"> <h1>Alice's Blog</h1> <?php $postslist = get_posts('numberposts=1'); foreach ($postslist as $post) : setup_postdata($post); ?> <div class="entry"> <h2 class="post_title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2> <?php the_content(); ?> <?php the_date(); ?> </div> <?php endforeach; ?> <?php get_a_post(5); ?> <div class="entry"> <h2><?php the_title(); ?></h2> <?php the_content(); ?> </div> </div><!-- /#inside_content -->
- The topic ‘homepage multi-loops’ is closed to new replies.