Display WordPress Recent Posts Widget in WordPress Website

WordPress Widget

Do you want to display your WordPress Recent Posts Widget? Displaying the latest posts can help your users find them easily. You can add the latest post in the sidebar after the end of the post content, inside the post content with shortcodes, in the footer widget area, and anywhere else you like. In this article, we will show you how to use the widgets method with recently published features to display recently published posts in WordPress(WordPress Recent Posts Widget).

But before we start, I will like for you to understand some basics concepts which include the definition of certain terms. First, let talk about widget; Widget in WordPress are blocks of content that you can add to your site’s sidebars, footers, and other areas. WordPress widgets were created to provide a simple and easy way for WordPress users to control the design and content of their site without having to code.

Secondly Sidebar; A sidebar in WordPress is referred to as a widget-ready area used by WordPress themes to display information that is not a part of the main content. It is not always a vertical column on the side. It can be a horizontal rectangle below or above the content area, footer, header, or anywhere in the theme.

Here is an image that illustrates sidebar and other key components in WordPress better:

Sidebar

Now that we have clarified some basic things let go into the details of what brings you here: Setting up recent posts with the widget in WordPress site. Kindly follow the steps below to accomplish this

STEP 1:

WordPress Widgets

Login to your site dashboard and go to the Appearance and select Widgets

STEP 2:

Look through the Available Widgets and Select “Recent Post” Widget and Pick the area you will like to display the Recent Posts on your website for example “Sidebar” and select Add Widget

WordPress Recent Posts Widget

 STEP 3:

Go to the Sidebar widget and adjust the number of posts you want to display on the site and Save the settings Once you are done

WordPress Recent Posts Widget

Once the above steps are followed you will see a recent post on the Sidebar of your site Just like the one on Spankradio website.

WordPress Recent Posts Widget

If your WordPress theme does not come with this Widget function, the first thing you need to do is install and activate the WordPress recent posts widget extension plug-in. After activation, just visit Appearance »Widgets and add the” Recent Post Extensions “widget to the sidebar.

Recent posts extended widget settings

The latest post extension widget comes with many options that give you complete control over how to display the latest posts on the WordPress website. You can display thumbnails, excerpts, restrict categories and tags, ignore sticky posts, etc. You can even use this widget to display the latest posts of any other post type on your website.

Recent posts with thumbnail and excerpt in the sidebar widget

Use shortcodes to display the latest posts in WordPress. It is very easy to add recent posts to the sidebar, but what if you want to display recent posts in a WordPress post or page? The easiest way to display the latest posts in WordPress posts and pages is to use shortcodes.

The first thing you need to do is install and activate Show Post Shortcut Insert. It works out of the box and has no settings for you to configure. Simply edit on the post or page where you want to display the most recent post. Next, use the shortcode [display-posts] and your own parameters in the post. The plugin provides all parameters that can be used with shortcodes. Here are some examples:

Show 5 recent posts, including thumbnails and excerpts

[display-posts posts_per_page = “5” image_size = “thumbnail” include_excerpt = “true”]

Show recent pages instead of posts

[display-posts posts_per_page = “5” post_type = “page”]

Change the order to the title instead of the date.

[display-posts posts_per_page = “5” order by = “title”]

Display the most recent page under a specific parent page.

[display-posts posts_per_page = “5” post_type = “page” post_parent = “5”]

For a complete list of parameters, please visit the documentation of the plugin.

You can also use these shortcodes in text widgets, but first, you need to add the code to the theme’s

functions.php file or a site-specific plugin.

add_filter (‘widget_text’, ‘do_shortcode’);

Display latest posts manually in WordPress theme files

More advanced WordPress users may wish to add the latest posts directly to their WordPress theme files. There are multiple ways to do this, but the easiest way is to use the built-in WP_Query class. But we will not discuss that in the post.

You May Also Like

About the Author: BW

Leave a Reply

Your email address will not be published. Required fields are marked *