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?
- Code for Recent Posts Widget
- Modify recent post sidebar to show post thumbs with out plugins
- Proper method to restrict non logged users into certain pages
- WordPress multisite,several different languages,page redirect?
- template_redirect to accompany with a shortcode
- How to identifty post from its URL in 404 page?
- If numberposts = -1 offset won’t work
- 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
- Redirect the single product page link to the shop page
- Recent Posts widget without Title
- Change recent posts widget title
- Change template dynamically
- Display most recent post on homepage?
- How to truncate titles in Recent Posts widget?
- Recent posts with featured image or fallback image with permalink
- Recent Posts slider, using WP_Query(), loads duplicate sliders
- How do I add recent posts to the menu?
- WP Bakery Load More Button loads the same posts
- How to pass a message using template_redirect
- URL rewriting with custom user meta “/%shop_name%/gallery/%gallery%”
- Pre-Populate $wp_query settings with custom rewrite rules and custom template_redirect
- WP_Query with offset and ‘orderby’ => ‘rand’, offset not working
- Proper way to display latest 5 posts grouped by post type?
- How to override a query and display specific page by ID?
- Reset WordPress Post Query to default
- Author list based on recently active
- List most recently added posts (with a twist)
- Recent posts on homepage
- How to obtain the recent posts without their content in an efficient way?
- Why does the $_GET parameter ?search forward the front-page to the archive/blog page
- How to check if the current page is at a specified path in the URL?
- How to avoid duplicates when creating recent network posts
- Proper Way to Enqueue CSS for Front Page – template_redirect in functions.php?
- make permalink go to a custom single.php file
- wp_enqueue_style on template_redirect level?
- Redirect to first child in menu
- Display css ONLY on most recent post of specific category?
- How to redirect home page to another page after login for all user?
- Template Redirect to /2015 to use page template
- how to load posts to a custom post template after using template_redirect or template_include
- Redirect not logged in users if they are on a specific page and category
- Problem with Front-Page.php loading recent posts
- Call another page in forms
- Redirect returning users to a certain page?
- How to show 3 most recent/viewed posts in a special tiles on home page using wordpress?
- Homepage custom recent news
- send popup after wp_redirect()
- Trying to re-direct users to specific page based on an ACF variable
- Import Recent Posts Only and Ignore old ones if exist
- add title to widgets of wordpress
- Cannot manage to display my CPT in Recent Posts widget
- Custom Login page, redirection and restrictions
- Redirect Users who aren’t logged in, aren’t post authors and aren’t admin. Frontend
- Display Most Recent Post Widget Title On Page
- I want to replace after WordPress is completely loaded
- How to add a switch to admin area which enables/disables crisis-mode: Redirect all traffic to certain page if switch is enabled
- The styles in the recent posts widgets plugin not working
- WordPress recent post
- Posts Per Page with a button to add more Posts
- How to redirect (301) trashed post to it’s parent taxonomy TERM ARCHIVE instead of 404 page
- Internal redirect from page to category
- How to filter wp_get_recent_posts() to only posts that have thumbnails?
- Showing wordpress latest post thumbnails in slider with auto increment
- Best way to add image to recent posts widget?
- How to add thumbnails from recent posts to owl-carousel in wordpress automatically?
- Recent Posts Widget URL / Domain change
- How to check if the user was redirected?
- template_redirect called twice
- Show all posts of all categories but excluding a category on custom blog page with pagination of my theme
- Google indexed pages for one page site
- Adding a query var to taxonomy term archive – gets redirected to the other taxonomy archive page
- Building Menus with the latest posts included
- What hooks, actions or filters i can use to customize wordpress registration page and form?
- how to show the most viewed, random and recent posts in the home?
- Redirect to a subdirectory frontpage using without using a WP plugin- what files to edit, and how?
- Recent posts with different class name for each post and a scrollbar?
- Recent posts with comment count in “Sidebar” template [closed]
- How to display Most Recently Read 10 Posts by a logged in user in wordpress
- Creating FPDF directly in the browser using template_rediect
- Redirect drafted post of custom post type to URL?
- Cannot find redirect – WordPress behind HTTPS proxy (Cloudfront)