Introducing ACF display conditions, Post Skin for Timeline and Posts Extra filters & actions

We’ve been hard at work, focusing on what our customers asked from us in the past couple of months. While providing new widgets is a priority when we build Extras, we feel that it’s the little things that are usually forgotten by plugin creators. And those are sometimes what keep you up at night.

In version 2.2, Extras comes with some really cool new features which we believe will make it easy for you to enjoy the power of Elementor. That’s why we open our blog section with a presentation of these features and what they can do for you.

Post Skin for the Timeline Widget

After the recently introduced post skin feature for the Posts Extra widget we are adding the same functionality to the Timeline widget. This means you can design your own layout for the content of the cards in the same way.

Together with our brand new query control, which works similarly to the Elementor Pro one, you can search your templates library and display a custom template for the posts.

Posts Extra Filters & Actions

One of the things that were lacking in Extras widgets are the filters and actions that let developers change and extend our plugin. In version 2.2 we’ve just started adding filters and actions and we’ll soon add them to all widgets.

The Posts Extra widget now gives developers access to a bunch of very useful filters & actions which they can use to change and add additional logic for data printed inside the content of the post area. For example, you could replace the date of the post with a custom ACF field value, like so:

add_filter( 'elementor_extras/widgets/posts/date_time', function( $post_date_time, $post ) {
    if ( get_field( 'field_name' ) ) {
        return get_field( 'field_name' );
    } else {
        return $post_date_time;
    }
}, 10, 2);

The code above replaces the date with the ACF field with the name ‘field_name’ if that field has a value, otherwise it returns the post date. Check out a complete list of the Posts Extra filters & actions.

POST and GET Display Conditions

Ever submitted a form using Elementor or another plugin and wanted some content to be shown on the next page depending on values being submitted (POST) through the form? How about conditioning display if a user visits a page with a URL (GET) parameter such a referrer link? You can now do this with Extras.

ACF Display Conditions

Last but not least, the long awaited support for ACF Display Conditions is here.

Display Conditions is by far the most useful extension for Elementor that Extras has to offer, since it allows for content to be displayed based on different conditions such as login status, browser, current archive, page template type and so on.

Though Elementor handles static content and printing out dynamic content coming from custom fields in a magnificent way with the use of dynamic tags, there are some types of fields in ACF that are not meant to be displayed (they are not content). For example, the true / false field. An editor can check a box and mark something to be displayed or not. These conditions were usually done via code. The developers created the fields and added the logic via code.

Now you can do this with Extras. For any element, go to Advanced > Extras > Display Conditions and you will find a new group called ACF. For every ACF condition you can search for field names.

These conditions support all ACF fields and each trigger a different type of control to select when the conditions are met. There is a lot of flexibility in using this functionality.

For example, you could condition the display of an element on an ACF Relationship field. The element will be shown if selected posts inside the condition are part of the ones selected in the ACF field in the post edit screen.

The above example shows how you can add posts to the ACF Post condition. If these posts exist in the field values, the condition will be met.

The Choice fields (Select, Checkbox and Radio fields) allow you to add a list of options for which the condition is met. This works with both Names and Labels returned from the ACF field.

More goodies

Version 2.2 of Extras comes with another important updates such as:

  • Term Archive Display Condition: we know it’s been missing from the Display Conditions, but not any more.
  • Route type control in Google Map: You can now choose between driving, walking and bicycling and transit route types.
  • Trim custom excerpts in Posts Extra and Timeline widgets: a very important feature which takes the hassle out of excerpt printing and trimming, since posts with custom or automatic excerpt can now have the same excerpt length.
  • Date formatting controls for Posts Extra: a missing feature which makes it possible to format the date in the widget any way you like

Make sure you see the full changelog here and let us know how you feel about this update.