Category: Code Snippets

Add WordPress Custom Body Class

WordPress Add Class to Body In many cases, the auto-generated classes are not sufficient and we may need to add some custom classes. To add custom classes, we will use the WordPress filter: body_class Below we will show you snippets of the most requested examples. But first a little introduction to explain to beginners more […]

Release of GeoDirectory v 2.0.0.61

The release today of GDv2.0.0.61 brings a few little new features that we will go over here 🙂 Classifieds Dummy Data We did a poll on Facebook asking users to vote for the next dummy data type: directory developers facebook group Classifieds won and we have now added it. You can see it here: https://wpgeo.directory/supreme-directory/classifieds/ To […]

Loading WordPress language files correctly

WordPress localization features allows you to make plugins and themes easily translatable through WordPress Language files (po/mo files). This is true especially since WordPress 3.7 and it got a whole lot easier since WordPress 4.6. A lot of improvement has been made to the whole translation system for WordPress, I felt it really needs a […]

Distance to custom field

Update Sept 2019 This has been added as a predefined custom field in V 2.0.0.67. The snippet below will only work if using GeoDirectory V1. The Problem Today a member had a bit of an unusual request, they are using GeoDirectory to run a local festival and they are listing things like accommodation for it. […]

How to remove all GeoDirectory Breadcrumbs

Even if we don’t have Breadcrumbs on this website, we consider them very important, that’s why GeoDirectory has breadcrumbs on all its pages. They allow your visitors to always know where they are at, while navigating your website. We would never suggest to hide them, but several of our users asked how they could remove […]