Delete Old WordPress Comments Automatically

There are a few reasons why you might need to automatically delete comments based on date. For maintenance or even performance.

A while back me and my friend Pedro Carvalho where working a project that needed this feature for legal reasons. We developed a plugin and decided to release it in the WordPress plugin repository with the permission of the project managers.

Delete Old Comments is very simple, non intrusive plugin. It will provide you a few options to automate the task of deleting comments based on age. They can either be sent to trash or permanently deleted.

The plugin will offer you 3 simple settings:

  • Recurrence – How often to check for old comments
  • Age – Set how old they need to be to exclude them
  • Operation Type – set if the operation will trash the old comments or permanently delete them.
settings page for plugin
Plugin Settings.

The new settings will be added to the ‘Discussion’ settings page.

We hope this simple plugin is helpful if someone else needs to implement this feature.

Feel free to leave feedback or ask any question either in the comments section below or on the plugin page.

Interactive Maps in Elementor Page Builder

Elementor Page builder is one of the most popular WordPress plugins of it’s type. It has tons of widgets available, but you might need something different for your project. If you need to create an interactive map of the world or of any country, but need something different than Google Maps, you might want to try theĀ Interactive World Maps plugin. These are some examples of maps created with this plugin.

All Countries Placeholder
All Countries
Map Markers Placeholder
Map Markers
US Map Placeholder
US Map

The plugin is fully compatible with the Elementor Page Builder. After you create your map you can easily add it to your page using the Shortcode widget. Below we’ll explain how you can do this with some very simple steps.

1) Install the Plugin

The plugin is for sale exclusively on Envato Market for only $29 with 6 months support included and all future updates. Once you have the plugin zip file, you can install through the Plugins > Add New > Upload interface in your administration. Once you have the plugin installed you’ll see the new ‘Interactive Maps’ menu entry in your administration menu.

2) Build your Map

The plugin comes with more than 300 maps, where you can colour regions or add markers. Both regions and markers can be interactive, displaying tooltips on hover and perform actions on click, like opening a new page or display information on a lightbox or next to the map. Follow the onscreen instructions and create the map to fit your needs. There’s a video tutorial available for beginners also.

Once you have your map saved, you’ll have a unique shortcode. That shortcode will be used to add the map to your page.

3) Add the Map to your Elementor page

The current version of the plugin will not add a new map widget to Elementor builder. However you can use the map shortcode on the existing Shortcode Widget. Just add the shortcode widget to the place on the page where you want the map to display and add the map shortcode there. The preview will not display the map immediately, but once you save your page and preview it, you should see your map.

And that’s it. You can create as many maps as you want and add them into different shortcode widgets. You can also add the map shortcode together with normal text in a text editor, but the Elementor preview will not display the map placeholder, just the shortcode itself, but once published, the map will also display.

If you have any question about Elementor or the Interactive World Maps plugin leave a comment and I’ll try my best to help.

Get Interactive World Maps plugin for only $29

One time fee. All future updates included and 6 months support.

Date picker in Divi Contact Form

Divi is one of the most used themes on WordPress and one of the latest updates introduced a ton of new features for the Contact Form module. However a simple yet useful input type missing is a date picker. Might not be used by the masses, but it’s very useful for some cases. For a recent project I needed to build a contact form that would work as a booking request form, so a date picker field would be a valuable addition to the arrival and depart date fields.

I helped to develop a plugin that allows you to do this and also has the extra option of enabling a time picker. The plugin is now maintained by InputWP.

With this plugin enabled, what you need to do is give a unique Field ID to your field, when editing the field you want to convert to a date picker, in the Contact Form module. For my project I used ‘date-arrival’ and ‘date-departure’.

Then you’ll use those IDs to tell the plugin which fields to convert to date pickers. Go to Settings > Date Time Picker and add the following to the ‘Selectors’ field:

input[data-original_id='date-arrival'],input[data-original_id='date-departure']

Basically you’ll need to add input[data-original_id='your_field_id'] to the selectors field and repeat that if you have more fields. If you copy/paste the code from here, make sure to re-write the ‘quote’ signs, since they might get changed in the copy/paste.

When you save these changes you should have your contact form fields converted into date pickers.

Here are some screenshots of how I implemented the date and time picker in the field.

Not so hard, right? Hopefully Divi will include a date-picker or date-time-picker option for the contact form fields at some point, but until then these workarounds are easy enough to implement.