Links to Posts on a Page
-
I am in the process of converting a static website to all WordPress (it already has WordPress section for news)
On the old site I could, on a non-wordpress page, do links to links to the titles of the last few articles (posts) by using this code:
<div id="more" style="width: 290px; float: right;"> More <strong><a href="https://www.hadleightemple.org.uk/CorpsNews/?cat=9" target="_blank">Silver Service Club News</a>:</strong> <ul class="navlist" style="margin-left:15px; font-size:0.8em" > <?php require_once('../CorpsNews/wp-blog-header.php'); $posts = get_posts('numberposts=5&category=9&order=DESC&orderby=post_date'); foreach ($posts as $post) : start_wp(); ?> <li style="margin-left:margin-left:3px"> <a href="<?php the_permalink() ?>"> <?php the_title(); ?> </a></li> <p> <?php endforeach; ?> </p> </ul> </div>
I have tied to put this code on the page, which is now a WordPress page, but it doesn’t appear as it should.
I am using Weaver II Pro.
Are you able to help please?
TIA
Brian
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Links to Posts on a Page’ is closed to new replies.