OK, I found a way to do this, but I’m having trouble getting it running on my site. I know I’m missing a line at the end of each section, but I don’t know what it is.
<h3>Stuff About Me</h3>
<ul>
<?php
$posts = get_posts('numberposts=2&order=ASC&category=34');
foreach ($posts as $post) : start_wp(); ?>
<li> <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a><br />
<?php the_excerpt(); ?></li><p>
<?php endforeach; ?>
<li> <a href=https://www.lisavollrath.com/pages/category/according-to-lisa/about-me/>more articles in this category...</a></li></ul>
<h3>Stuff About My Art</h3>
<ul>
<?php
$posts = get_posts('numberposts=2&order=ASC&category=39');
foreach ($posts as $post) : start_wp(); ?>
<li> <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a><br />
<?php the_excerpt(); ?></li><p>
<?php endforeach; ?>
<li> <a href=https://www.lisavollrath.com/pages/category/according-to-lisa/about-my-art/>more articles in this category...</a></li></ul>
<h3>Stuff About My Workspace</h3>
<ul>
<?php
$posts = get_posts('numberposts=2&order=ASC&category=35');
foreach ($posts as $post) : start_wp(); ?>
<li> <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a><br />
<?php the_excerpt(); ?></li><p>
<?php endforeach; ?>
<li> <a href=https://www.lisavollrath.com/pages/category/according-to-lisa/about-my-workspace/>more articles in this category...</a></li></ul>
What goes between each section? I’ve tried <?php endwhile; ?>
between each one, and I get a blank page. I’ve also tried <?php endif; ?>
, and same blankness. However, if I post it as is, I get the desired result in the first section—title, the first two articles, and a more link—and then just title, bullets, and the more link for the remaining sections. It’s just not sucking in the article links this way.
Sorry if that’s a winding description. I’m an artist, not a developer, and up until two weeks ago, I was doing everything on my site with perl and cgi. This PHP stuff is kicking my butt…