This is a little broad and more than one approach is possible.
If you want to show posts in general sidebar area you would need to:
- Find and edit a template file responsible for that output in your theme
- Use
WP_Query
to query set of posts and output the results.
If you want to implement this in a sense of sidebar Widget (that can be controlled in admin to move it around and such) you would need to:
- Create a Widget, using Widget API.
- Again, use
WP_Query
for querying and output.
Given that your requirements are not that elaborate it might also be a good idea to look for existing plugins that offer post–listing widgets, they should be quite a few around.
Related Posts:
- Custom text box containing post titles
- Display recent posts with thumbnail within Masonry
- How do I use wp_get_recent_posts?
- Add Date to Recent Posts Widget?
- Recent Posts widget has some older posts at the top? [closed]
- Adding a badge to new blog post titles
- How to make slider show 4 recent news and news start from begining not from 4th
- Display recent post by tag
- Small intro before latest blog posts
- WordPress Recent post only showing title
- Recent post on single page from specyfic category
- How to display posts on template
- Help with “Recent Posts” Loop that is specific to a topic
- Get Each user recent post in wordpress
- How to create custom URL routes?
- single-{$post_type}-{slug}.php for custom post types
- How to display last 3 posts (recent posts) in a static page?
- Custom Post Types and template_redirect
- Code for Recent Posts Widget
- template_include (overriding default plugin templates via current theme)
- Display list of most used tags in the last 30 days
- How do I redirect /search/ to wordpress search template?
- Modify recent post sidebar to show post thumbs with out plugins
- Proper method to restrict non logged users into certain pages
- Querying post from a multisite network
- Want to redirect if search query match exact title of any post
- stop redirection on /wp-admin call to /wp-login
- WordPress multisite,several different languages,page redirect?
- Display all comments or recent comments per user on author page
- redirect wp-login.php to another page
- Add inline HTML to posts published within last 24hrs
- Include a file before current template file
- Modifying recent post widget to include icons for post titles
- Add thumbnail to recent posts widget using filters
- How to exclude categories from recent posts, recent comments & category widgets?
- meta_query not working properly
- Where does the 404 redirection happen?
- Unable to show recent custom post types in default recent posts widget
- Related Posts loop – offset
- template_redirect to accompany with a shortcode
- How to identifty post from its URL in 404 page?
- Show one post per author and limit query to 8 posts
- Custom pagination structure
- How to target the default Recent Posts and Recent Comments widgets with pre_get_posts?
- Empty excerpt using wp_get_recent_posts
- Display Custom Post Type in Recent Posts
- Show recent published posts
- How to hide a post from ‘Recent Posts’ widget?
- customizing recent posts
- If numberposts = -1 offset won’t work
- Display the date before the post title in recent posts widget
- How to display recent posts added in several custom post types
- Order posts by meta value and Date
- What’s the difference between “get_posts” and “wp_get_recent_posts” when used with “setup_postdata”?
- wp_head() not including styles and javascripts after a template redirect
- How can I show recent posts from same taxonomy as the post currently being viewed?
- How to display recent / random posts by its category
- Grabbing specific content
- Redirect the single product page link to the shop page
- How to get most recent commented post above new submitted post in WordPress?
- Two posts are loaded instead of one?
- Recent Posts widget without Title
- How to correctly detect accessing wp-content/uploads?
- Change recent posts widget title
- How to start with post number x?
- Change template dynamically
- Use wp_get_recent_posts with search term
- Create static front-page with 3-5 recent posts
- Display most recent post on homepage?
- the_excerpt not showing posts
- Are Category or Tag Archive Pages Possible?
- How to truncate titles in Recent Posts widget?
- Customizing wordpress default widgets?
- Redirect all child taxonomy to its parent
- Redirect specific page in WordPress for first time visit
- how to block direct access to multiple thank you pages?
- Recent posts with featured image or fallback image with permalink
- Template redirect template loaded, but the header 404
- Recent Posts slider, using WP_Query(), loads duplicate sliders
- recent posts for different categories
- Excluding a category from wp_query breaks recent post widget
- Serve specific “template” page at any URL that ends in its slug
- Adding rewrite rule dynamically for search results redirecting to 404 URL
- How do I add recent posts to the menu?
- WP Bakery Load More Button loads the same posts
- URL Rewriting for PHP script on an image URL
- How do I exclude recent post from recent post php widget
- How to output only blockquotes content from recent posts in a widget?
- menu item to display the most recent post
- Redirect custom post type category to other custom post type category
- wp_redirect on base wp-admin and login
- Setup template_redirect using has_term when NO term assigned
- Single-post preview repeats thumbnails in Jupiter Recent Posts widget
- How do I determine what is causing a redirect for a given page?
- Why does my URL rewriting only work using two different methods?
- How to pass a message using template_redirect
- URL rewriting with custom user meta “/%shop_name%/gallery/%gallery%”
- Force HTTPS 301 redirect with hook
- Pre-Populate $wp_query settings with custom rewrite rules and custom template_redirect
- Common single page template options