Building maps with COVID-19 data in WordPress

Recently a lot of users have started using Interactive Geo Maps plugin to create interactive maps with data from the new coronavirus (covid-19).

Here are some screenshots of maps created using the plugin:

US map divided by states with COVID-19 data
US Map
Australia Map
World map with clusters of covid-19 confirmed cases
World Map

Portugal Map

These images have data updated on March 25th 2020. You can click the images to open the interactive version of each map.

Sometimes it might be tricky to get the data you need correctly formatted, unless you plan to add the data manually. So in each article there are some tips on how to get the data, sometimes automatically, to populate your maps. Since the plugin allows you to write custom javascript to manipulate the data used by the map, we can use this to fetch external content and format it to be compatible with the map. There’s some reliable data sources out there, which are made available for research and educational purposes, so if your project fits, you can use those data sources.

The data repository by Johns Hopkins CSSE is one of those examples. They have been doing amazing work collecting the data and making it available in this public repository. They provide data for all the world and some more detailed data for specific countries like the US, which allows us to create a US specific map. They mention they might also do this at county level, which would allow us to even create maps for individual states with county information.

The example maps linked above, contain some javascript code to exemplify how you can get that data. Remember to credit the source and help if possible.

The maps are able to have markers with different sizes and colours, heatmaps created automatically based on available data, click actions and custom tooltip content, automatically populated with the available data.

The plugin also has a free version, but it’s limited in what you can do. It’s not possible to have markers with different sizes, read from external data or colour regions in different colours, but you can create a simple map with the information about the affected areas for any country.

Feel free to contact me if you plan to make a similar map and have any particular question.

Interactive Geo Maps

Try it for 7 Days

Date and Time Picker field on Contact Form 7

Most websites online will need a contact form and Contact form 7 is without any doubt one of the most popular plugins on WordPress with 5+ million active installations and growing. It’s amazing how simple and versatile the plugin is, allowing any form to be extended using simple tricks.

The plugin comes with support for ‘date’ fields, but for some projects you might need a datetime field. There’s a plugin by inputWP that can help you with this and I’ll explain how you can use it with CF7.

Install the Date Time Picker Field

Although the plugin was not built to work directly with CF7, it’s compatible with any form you might have on your website, Contact Form 7 included. You’ll just need to follow some simple steps.

Add a normal text field to your form

The first step is to build your form. For the fields you want to convert into datetime fields, simply use text fields. You can name the field whatever you want, but you will need to pay attention to the class name you add:

It doesn’t necessarily need to be ‘datefield‘ it just needs to be something unique and that you remember after, when setting up the Date and Time Field plugin.

Setup Date and Time Field plugin

Once you have your form, you need to go to Settings > DateTime Picker. In the CSS Selector option, add the name of your class, preceded by a . (period). In this case .datefield This will be the css selector the plugin will use to look for the field and convert it into a date and time field:

And that’s it! You can explore the other settings available in the plugin to optimize the date time picker.

Guided Selling Solution for WooCommerce

Guided selling is a process to help potential buyers find the best product or service according to their needs and expectations. They can be product finder tools, online shopping assistants or product suggestions engine for example.  In the world of online shopping, guided selling is a powerful tool that any shop owner should use to engage users and connect the right products or services with potential customers based on their interests.

What needs to be done?

The process is simple to understand:

  • Engages users
    A visually appealing interactive experience captures users attention, keeping them on the site longer and encourages them to come back.
  • Understand their needs
    Asking the right questions will keep your visitor engaged and it will provide you valuable information to understand what they’re looking for.
  • Provide tailored product or service suggestions
    Once you have information about the expactactions and needs of your potential buyer, you should be able to provide an informed and tailored product or service suggestion.
  • Increase conversions
    Getting a tailored product or service suggestion that meets all the users needs and expectations, will most likely result in a successful sale.

Search Filters vs Guided Selling

Advanced search filters for WooCommerce are a popular solution, but sometimes it can be overwhelming for the user to understand all the technical attributes and abstract features. Guided selling solutions, like product wizards, follow a needs-oriented paradigm that facilitates exploration and inspiration, becoming more friendly to the user. It provides a emotional experience and not a rational one, which should engage the user even more. While search filters might result in a ‘Match not found’, the guided selling solution should be able to present close alternatives when there isn’t an exact match.

The search filters are an essential feature that your WooCommerce website should have but an interactive guided selling tool can complement that and can be a great way to initially attract potential buyers to your website.

Introducing Advisor Quiz for WordPress

There weren’t many solutions to build guided selling tools for WooCommerce, but lately this is changing. The new Advisor Quiz plugin will allow you to build a quiz that will act as a guided selling tool, a products suggestion engine.

Although it’s essentially a Quiz Builder, it has a particular feature that will allow you to build guided selling solutions. It allows you to build a ‘Content Advisor’ quiz, where you can create questions where the answers will act as content filters. With this plugin and a bit of creativity you should be able to create a guided selling tool that will engage your users, get you leads and improve conversions.

You can create an interactive dialogue system, a product wizard that will provide shoppers with personalized suggestions. The user answers a couple of questions and the plugin will analyse the user’s answers, converting them into product features/categories/attributes and match them against available products in the background. At the end of the quiz, the user is presented with a list of suitable products. With the right combination of questions and answers, you’ll understand the users’s individual preferences and assist them in finding products that fit their needs. This will also increase shopper’s confidence and encourage the online purchase.

Working with WooCommerce

You can filter WooCommerce products based on the following:

  • Keyword
    A word in the description or product title.
  • Categories 
    The most common way of separating and identifying the different groups of products.
  • Tags
    Another way of labeling the products that can help identifying their characteristics.
  • Attributes
    Depending on your products, these attributes can change. They can identify sizes and colours for example. These are yet another way of identifying your products.
  • Other fields
    Price and dimensions are other fields that can be used as a factor when searching for products.

Considering the available fields you can use to narrow down your products, you should think of questions you can ask your users in order to understand their needs and connect this needs to the available filter parameters. Each answer will correspond to a filter and in the end all filters will be merged and search will be performed to find the matches. You can also setup dependent questions, that will only display if users selected a specific answer on a previous question. The possibility are endless.

Be Creative

The plugin by itself, won’t do much, the potential will lie in the quiz you create. It needs to be appealing to your visitors, it should keep them engaged. Don’t ask boring questions, be creative and make your user feel you’re asking the right question. The questions and answers need to be well crafted for it to become engaging and at the same time provide information about their needs that you can use to filter the available products.

Study your Visitors Behaviour

The plugin will track usage activity (anonymous or not if consent is given at the end to share more data) that will provide you valuable data to understand what you’re users are looking for. This might help you improve the quiz or even build a better one. You can track referrals, answers selected and conversions among other things.


Although there aren’t many guided selling plugins for WooCommerce, Advisor Quiz is a tool to take into consideration. You can explore it’s potential and with a bit of creativity you can carefully craft a product advisor tool that will engage your users and improve your conversions. You can find the plugin exclusively on Envato Market.

How to add support for a Custom Post Type on Yet Another Related Posts Plugin (YARPP)

One of the most popular related posts plugins for WordPress is YARPP with more than 200.000 active installations. It says it supports Custom Post Types (CPT), but not out of the box. You’ll need to do some extra things in order for your CPT to be supported.

If you have access to the functions that register the CPT, then the solution is simple. You’ll just need to include the argument ‘yarpp_support’ and set it to true when you register it.

If you don’t have access to the code where the CPT if registered, maybe because it’s a third-party plugin that is creating it, you can still try to manipulate the arguments used to create that CPT and add the ‘yarpp_support’ argument. You can use the code below:

You should replace ‘my_custom_post_type’ with the identifier you need and add the code to the functions.php of a child theme or your own plugin. This seems to work well on my projects.

Hope this helps someone!