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?
- 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
- 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
- Verify if tag is used on posts
- How to know if get_posts() failed?
- Dynamically update post title in admin page
- How to get previous 10 days post from a specific date – WP Query
- How to show posts rank based on custom field value
- is there a better way of combining this?
- Displaying Page Title on index.php
- How to intercept Post Title on Post-Save
- Add Category name to Post Title (h1)
- How to add a custom field after wp post
- Encrypt / Decrypt Post Title and Details
- 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
- 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
- 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
- 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?
- WordPress is replacing double minus signs in Post Title, how to disable it?
- Is there a way to specify an extra class for a post or page with no title?
- Posts loop displaying the same post data
- Images inside post title
- Loop doesn’t show title of second post and posts thereafter
- 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?
- How to create a “latest news” page showing a list of posts from blog category
- 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
- How to remove “» (title of post or page)”?
- get_posts not pulling the correct number of posts
- Get featured image on hover of post title [closed]
- Get x recent posts by author?
- How do I display the post_title with get_permalink?
- List latest posts with least comments in WP-Admin
- If post exists, make it a comment in existing post with same name?
- Change modified date to current date when title updated automatically
- How to select a category automatically based on a word in WordPress post title?
- How to show multiple posts thumbnail, title and date in widget
- I need to create “View Profile” and “Edit Profile” links by incorporating the Post Title/ID, but can’t seem to manage it
- Show only posts with titles/permalinks that do not contain certain words
- how to show current date on post title which should be auto update in every day
- Adding Text after Post Title based on Category using IF Condition – But not for menu items
- How to add first 3-4 post tags on WordPress Post Title
- get_next_post() not working with future post status
- Extracting the permalink from a post instance
- Add id attribute to h1 element of wordpress post
- Posts page listing pages as well
- Odd hyphen added at end of blog post
- My posts page is missing the page title
- Hiding title of selected post without plugins
- 2 Domains, Same Content, Different Titles?
- WP_Query to get posts in a specific tag or has post_format
- Post Category link is same with Page link
- How to Get Position of a Post from a category and tag
- How can I choose and change a post title at random from an array when it is published?
- Any difference betweenn posts and pages for one page?
- Post title to show all characters after having it limited for preview
- Add Image Before Posts Entry Title
- prevent same wordpress post title
- Get post title by Alphabet
- Get post title of faulty link on 404 error page
- Is it possible to have different header style blog titles in different categories?
- Displaying posts on Homepage
- Load posts from external source if not found in database
- display only the title of the post into a certain category
- How do I show the post title if an advanced custom field hasn’t been used?
- Deleting first four characters from all Post Titles
- clicking on page title
- Title displaying multiple times
- append $_GET parameters to post
- Custom Post-Rename Function Does Not Function in WordPress 6.x
- Word count for all posts of all authors
- View post with specific category id and name which I selected in the backend (drop-down option)
- How to change Post title background size?
- Translation related post text to Arabic