How to Delete Duplicate Listings from Sabai Directory

Sabai Directory is one of the great plugin for WordPress if you want to make a local directory site. It has full feature ready out of the box that you probably want from a directory, but depends on your method of populating the database it requires some tweaks.

It supports importing from CSV, but if you are like me, your CSV might have some duplicates which might result in few or even hundreds and thousands duplicates. Sure it would be a laborous task to sort out manually from plugin admin panel.

It doesn’t provide any kind of mechanism to filter out duplicate listing from any field of entries, in my case I find bunch of listing with precisely similar Address and Phone number, thus I created this SQL query to sort them and delete them from Sabai Directory table(s).

Also, if your theme generates hatom and you need to remove hentry from your WordPress directory pages try this code and put that in your functions.php file of the theme.

Leave a Reply