ACF Recent Posts Widget

ACF Recent Posts Widget

Wordpress plugin

Install on Wordpress

App Details

ACFRPW adds a new widget to the Appearance -> Widgets -> ACF Recent Posts Widget. Most of the fields are quite obvious, you can choose from a set of settings to display the posts from.
Each setting alters the amount and type of posts listed in the sidebar.

Available Settings

The widget supports the following settings:

  • Widget Title
  • Custom Widget container CSS class
  • Option to ignore sticky posts
  • Search keyword query
  • Id based post exclusion
  • Date Display, Date Modified, Relative and Custom Date Format specifiaction
  • Listing posts from specific date period (start and end)
  • Listing posts with specific password, listing password protected posts only or excluding these
  • Post Type selection
  • Post Formats selection
  • Post Statuses selection
  • Listing posts limited to author via author id
  • Order specifiaction (ASC or DESC)
  • Orderby specification (ID, Author, Title, Date, Modified, Random, Comment Count, Menu Order, Meta Value, Meta Value Numeric)
  • Meta Key specifiaction (if Meta Value or Meta Value Numeric were chosen as orderby rule)
  • Meta Comparison selection
  • Meta Value Specification (for the Meta Comparison selection)
  • Category limitation
  • Tag limitation
  • Id based custom taxonomy limitation
  • Operator specifiaction for the above rules
  • Number of posts to show
  • Number of posts to skip
  • Thumbnail display, thumbnail size (width, height), thumbnail alignment, default thumbnail
  • Excerpt display, its word limit, its readmore text (occurs only if the amount of words exceeds the limit)
  • Custom HTML to display before the loop
  • Custom HTML to display after the loop
  • Custom HTML to display before each posts. It supports custom meta keys and ACF fields
  • Custom HTML to display after each posts. It supports custom meta keys and ACF fields
  • Custom HTML to display for no posts found
  • Custom and default CSS
  • Custom HTML templates

ACF supported fields

The plugin has been tested with ACF 6 (Free and Pro).

The plugin supports the following ACF fields:

  • Text
  • Textarea
  • Number
  • Email
  • Password
  • Wysiwg Editor
  • Image
  • File

No other fields have been tested and are supported at the moment.

Shortcode

From version 4.4 the plugin supports shortcode embeds. Given the amount of options and their specific names (as in shortcode attributes) the shorcode builder has been introduced
see 7th and 8th screenshots for the reference.

You’ll see a popup once clicked on ACFRPW button which gives one an ability to automatically set up the shortcode code for you. The rest follows all of the options specified here.

To use the shortcode one needs to have the WordPress editor enabled for the current page / post type. In case it was disabled (say via ACF) the button won’t appear.

Creating Custom Templates

From version 4.3 the plugin supports custom templates. To make usage of these one needs to make a copy of all the files found
in the acf-recent-posts-widget/templates directory and copy them over to the active template directory to acfrpw subdirectory.
The approach is similar to the way WooCommerce plugin works and has it’s drawbacks. With every new feature the files may be outdated.

Similarly to the widget template files, a separate, custom markup can be created for the shortcode build post listing. Copy the acf-recent-posts-widget/template files
to acfrpw-blog directory created inside your active theme directory.

Template files

There are 3 main template files:

  • loop-after.php (which displays the markup after each of the posts and closes the markup container)
  • loop-before.php (which displays the markup before each of the posts and opens the markup container)
  • loop-inner.php (which is enqueued for each of the posts separatelly and contains the markup of every single post)

Usage

The usage is quite advanced hence each template file contains a quite detailed documentation on how to use it.

First of all the template files mustn’t have the global variables removed. Each of these variables stores the widget settings, which are then used to generate the code.
Second of all the variable names are unobvious, loop-inner.php template file contains a list of all the names used, which are then extracted and available as php variables.

Different template per widget / sidebar

The templates allow one to adjust the markup of each single widget. One needs first to verify the widget id used, which may then be referenced.
The variable which stores the widget id is $acf_rpw_args[‘widget_id’]. Dumping the value in the template is the best way to find out which automatic id has been created for your widget.

The best way to handle the templates is to learn from their code. My personal suggestion is to copy over the templates to the current theme and work directly on them, doing one change at a time.
The templates require learning curve to use and there’s no single answer to everyones problem.

Complex usage

This section covers plugin complex usage for advanced user willing to have more control over the behavior of the plugin as well as explains uncommon functionalities.

Using the HTML textarea fields

These sections might not be obvious. The HTML or text before / after the whole loop setting is an area where you can specify custom HTML markup to be added before / after the whole posts list.
The HTML or text before / after each post is an area where you can not only specify custom HTML, but you are also given an ability to print any meta key or certain ACF fields (see ACF supported fields)

Meta Key Name / ACF Usage

These fields need to be wrapped inside the {meta name} or {acf field_name} tags (which are similar to shortcodes). The plugin will then parse these fields and print their according value. Say we have a custom ACF field of type text, for which the Field Name is “text”.
To print its value one has to use [acf text] inside the befoe / after each post textarea. A similar solution applies to the meta key.

Meta Value Usage

The Meta Value field supports an array of elements, so that all of the meta_compare parameters could be used. To do so, please specify the two parameters separated by semicolon, for instance: 1234;12345.
The plugin will convert these into an array and apply the proper operation for the two. Whatsmore the [date] shortcode can be used here. It takes the timestamp paramater as an argument, which is required – the possible arguments are the same as for
the function described here: http://php.net/manual/pl/function.strtotime.php. For instance [date +1 day] would generate the tomorrow date in “Ymd” format.
This can be used with custom meta field date.

Plugin Filters

The are several filters that can be used to enchance the plugin programatically:

  • ‘acf_rwp_query’ which gives one the ability to filter the query applied to each widget.
  • ‘acp_rwp_before’ which gives on the ability to filter the Front End output of the plugin before each post. There are two hooks attached here already which allow usage of the [acf] and [meta] shortcodes.
  • ‘acp_rwp_after’ which gives on the ability to filter the Front End output of the plugin after each post. There are two hooks attached here already which allow usage of the [acf] and [meta] shortcodes.
  • ‘acf_meta_value’ which filters the meta_value query parameter.

Check the acf_widget_widget file for the arguments and use cases.

Dependencies

Other

Languages Supported

  • English (default)
  • Polish (since May 11 2015)
  • French (since June 29 2015), by wolforg, standalone source
  • Spanish (since July 30 2023)

Pricing

Starting from $0 per month.

Check Out the Donation Form Widget

By Common Ninja

Donation FormTry For Free!

App Info

Rating

Reviewers

12 reviews

Tags

acf
posts
recent
widget

Developed By

magicoders

Quick & Easy

Find the Best Wordpress plugins for you

Common Ninja has a large selection of powerful Wordpress plugins that are easy to use, fully customizable, mobile-friendly and rich with features — so be sure to check them out!

Testimonial

Testimonial plugins for Wordpress

Contact Form

Contact Form plugins for Wordpress

Maps

Maps plugins for Wordpress

Translation

Translation plugins for Wordpress

Chat

Chat plugins for Wordpress

Slider

Slider plugins for Wordpress

Reviews

Reviews plugins for Wordpress

Contact

Contact plugins for Wordpress

Galleries

Galleries plugins for Wordpress

SEO

SEO plugins for Wordpress

Forms

Forms plugins for Wordpress

Comments

Comments plugins for Wordpress

Backup

Backup plugins for Wordpress

Privacy

Privacy plugins for Wordpress

Optimize

Optimize plugins for Wordpress

Tabs

Tabs plugins for Wordpress

Social Sharing

Social Sharing plugins for Wordpress

Events Calendar

Events Calendar plugins for Wordpress

Comments

Comments plugins for Wordpress

Social Feeds

Social Feeds plugins for Wordpress

Social Sharing

Social Sharing plugins for Wordpress

Portfolio

Portfolio plugins for Wordpress

Video Player

Video Player plugins for Wordpress

popup

popup plugins for Wordpress

SiteMap

SiteMap plugins for Wordpress

Payment

Payment plugins for Wordpress

Coming Soon

Coming Soon plugins for Wordpress

Inventory

Inventory plugins for Wordpress

Testimonials

Testimonials plugins for Wordpress

Portfolio

Portfolio plugins for Wordpress

Membership

Membership plugins for Wordpress

Forms

Forms plugins for Wordpress

Analytics

Analytics plugins for Wordpress

Events Calendar

Events Calendar plugins for Wordpress

Sliders

Sliders plugins for Wordpress

Analytics

Analytics plugins for Wordpress

Reviews

Reviews plugins for Wordpress

Security

Security plugins for Wordpress

Ads

Ads plugins for Wordpress

Music Player

Music Player plugins for Wordpress

Countdown

Countdown plugins for Wordpress

Email Marketing

Email Marketing plugins for Wordpress

Membership

Membership plugins for Wordpress

Ecommerce

Ecommerce plugins for Wordpress

Customer Support

Customer Support plugins for Wordpress

Video Player

Video Player plugins for Wordpress

Tabs

Tabs plugins for Wordpress

Social Feeds

Social Feeds plugins for Wordpress

Common Ninja Apps

Some of the best Common Ninja plugins for Wordpress

Browse our extensive collection of compatible plugins, and easily embed them on any website, blog, online store, e-commerce platform, or site builder.

Donation Form for Wordpress logo

Donation Form

Collect and manage donations securely with a customizable online donation form that supports Stripe or PayPal and helps increase contributions.

Job Listings for Wordpress logo

Job Listings

Create job listings with a jobs board widget that lets you post openings, manage roles easily, and help candidates find the right positions quickly.

Slide-In Panel for Wordpress logo

Slide-In Panel

Slide in panel that appears from the top or bottom to highlight offers, capture attention, and guide visitors toward more conversions.

Image Hotspot for Wordpress logo

Image Hotspot

Add interactive image hotspots to your site to turn static visuals into clickable guided experiences that improve engagement.

Social Proof for Wordpress logo

Social Proof

Show social proof that displays real user activity to build trust instantly, boost credibility, and help increase conversions across your site.

Marketing Button for Wordpress logo

Marketing Button

Marketing button with text and an icon that highlights key offers, draws attention to promotions, and helps increase engagement and conversions.

Podcast Player for Wordpress logo

Podcast Player

Add a podcast player to your site to embed and organize episodes, provide responsive playback, and keep listeners engaged.

Currency Converter for Wordpress logo

Currency Converter

Add a currency converter to your site so users can view equivalent values in their local currency for easier global access.

Nudge Button for Wordpress logo

Nudge Button

Nudge button with a subtle shaking animation that draws attention to important calls to action, increases interaction, and helps boost conversions.

Tilted Image for Wordpress logo

Tilted Image

Use tilted image effects to rotate visuals, add creative style, and keep visitors engaged with dynamic images on your site.

Engagement Toolbox for Wordpress logo

Engagement Toolbox

Use an engagement toolbox that combines forms, galleries, chats, and interactive elements to increase visitor activity and create a more engaging user experience.

Image Grid Slider for Wordpress logo

Image Grid Slider

Showcase visuals with an image grid slider that blends a grid layout and carousel motion to create a dynamic, customizable, mobile friendly display.

More plugins

plugins You Might Like

Discover Apps By Platform

Discover the best apps for your website

WordPress
Wix
Shopify
Weebly
Webflow
Joomla
PrestaShop
Shift4Shop
WebsiteX5
MODX
Opencart
NopCommerce

Common Ninja Search Engine

The Common Ninja Search Engine platform helps website builders find the best site widgets, apps, plugins, tools, add-ons, and extensions! Compatible with all major website building platforms - big or small - and updated regularly, our Search Engine tool provides you with the business tools your site needs!

Multiple platforms