Category: Code Snippets

Add WordPress Custom Body class (2022)

WordPress Custom Body classes WordPress Custom Body classes are something any WordPress developer will need to deal with sooner or later. Using a plugin for this would be overkill because in most cases all we need are a couple of lines of code. So, how do we add WordPress Custom Body classes? WordPress has both […]

Release of GeoDirectory v

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: 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 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. […]

WordPress Child Themes in 2016

What is a Child Theme? WordPress introduced the concept of child themes in early 2010, at least that is when they first appeared in the Codex. Since then child themes have been described more or less like this: “A child theme is a theme that inherits the functionality and styling of another theme, called the […]

Contact Form 7 vs Simple HTML Form

This post is related to my last blog post about my efforts to speed up our site, by removing plugins where the benefit does NOT outweigh the convenience.  (Just here for the code samples? Click here.) The Story: Up until a few days ago our site was using the very popular plugin “Contact Form 7” which at present […]

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 […]