This sounds like an additional Loop on that page, right?
You might want to use:
<ul>
<?php $posts_query = new WP_Query('posts_per_page=5');
while ($posts_query->have_posts()) : $posts_query->the_post();
?>
<li><a href="https://wordpress.stackexchange.com/questions/20489/<?php the_permalink(); ?>"><?php the_title(); ?></a></li>
<?php endwhile; wp_reset_query(); ?>
</ul>
Also read more here:
http://codex.wordpress.org/The_Loop#Multiple_Loops_in_Action
Related Posts:
- WordPress not opening posts with only numbers if permalink is post_name
- How to merge the content of posts that have the same title?
- How to get all post titles starting with numbers and symbols?
- Get Posts Under Custom Taxonomy
- How to change the case of all post titles to “Title Case”
- Apply the_title() filter in post & page title, but not in menu title
- How to show related posts by category
- get_children() Not Working with orderby Parameter
- How to get all posts related to particular category name?
- get all posts ID from a category
- Remove post title input from edit page
- Set Post Title to Read-only and Disable Permalink Slug Editor in Gutenberg
- get comments and get posts in loop
- Disallow Same Post Title
- Get title of post without using the_title();
- Verify if tag is used on posts
- How to know if get_posts() failed?
- How to display posts by current user/author in a custom page template?
- Dynamically update post title in admin page
- How to get previous 10 days post from a specific date – WP Query
- Show the title of the latest post by author
- How to show posts rank based on custom field value
- Setting pagination for images attached to a post
- Query only Posts from Both of Two Category?
- is there a better way of combining this?
- Displaying Page Title on index.php
- WordPress get posts by date without query_posts
- How to intercept Post Title on Post-Save
- Testing for post title in ‘if/else’ statement returns no content
- get_post_field – Title without paragraph
- Add Category name to Post Title (h1)
- How to add a custom field after wp post
- Sorting posts alphabetical that have single digits
- Posts are not showing up on particular category
- get selected post using $_GET
- Can I set and show “important” post in my blog?
- setup_postdata doesn`t seem ot be working
- I want to show category in the post title , how can I do
- Encrypt / Decrypt Post Title and Details
- Get Posts via Taxonomy Term Name with Space
- Get specific posts by ID in wordpress
- How to prevent WordPress from updating the modified time?
- How to display following posts titles in separate div’s on a separate webpage
- Blog Posts not showing title
- Automatically republish old posts
- Lose “Blog Archive” from page title
- get_next_post() and get_previous_post() return wrong posts
- How to Orderby Comments by post title?
- Get posts by name and taxonomy term
- Inserting custom data to the_post() during loop
- How do I restart my loop with get_next_post()?
- Get mixed category random posts
- Limit popular posts by days
- Why is querying posts messing up my pages?
- get_the_content(“more…”) returns full text
- Insert Content In Between Post Feed
- Post Loop Missing Most Recent Post
- Get Posts Under Custom Taxonomy
- Include sticky posts on the static page front page
- Get attachments for posts that belongs to a specific category
- Pagination with an array of post objects?
- Any way for get_next_post() to use the actual post order instead of publish order?
- sql select for post_title and a term name
- WordPress is replacing double minus signs in Post Title, how to disable it?
- How do I change the core post search algorithm? Where is it found/constructed?
- Is there a way to specify an extra class for a post or page with no title?
- Posts loop displaying the same post data
- How to get posts from a current post’s month?
- How to get posts and comments amount per hour, per year and per month?
- While loop articles – if statement order
- Count number of posts of current month
- Add title for previous and next posts to Yoko Theme
- Images inside post title
- How to Get Posts, Including Private Ones?
- Loop doesn’t show title of second post and posts thereafter
- How To capitalize The First Letter Of Every Word In The Post Title
- Random posts from a pool of posts
- Conditional Tag for has post [closed]
- How to show show the Second page title in the page
- How to get links to the last N posts in a specific category?
- Create a list of posts with topic headdings
- How to get post content from an array of ids?
- Display Posts with template on a Page
- Number of displayed posts
- Why posts array is empty?
- Blog post not showing title
- How can I remove the first two words and shorten get_the_title()
- How do I include the category next to the title of a post?
- How to create a “latest news” page showing a list of posts from blog category
- Post Filtering by GET URL parameters
- How to style archive post titles… but only those posts who have comments?
- Replace image name on upload to the new post name on front-end form
- Edit the post title from the frontend
- Why in my query is display two title?
- How to give classname to post if post has no content?
- Image behind the post’s title
- Custom Articles page only showing a limited number of posts per page
- Change Post Title For Specific Category
- Related Posts function not working
- How to remove “» (title of post or page)”?