10. Custom Themes (Pro Only)

One of WP Business Directory Pro’s strongest feature is its ability to be moulded to suit a wide range of designs and styles. Afterall, it was specifically built with customisation in mind, so additional to deep administrator control over what content can and can’t be viewed those with a little CSS and HTML skills can easily create their own design template to ensure the Business Directory looks great on their website.

10.1 Create Your Theme

To create your own template locate the “template” folder within the plug-in directory. Copy it and paste it into your own theme’s root directory.
Next, rename this copied folder to “wpbdp”. You can now edit any or all of the files within this folder.
The plug-in will look for your theme’s “wpbdp” folder first. If it can’t find a customised version it will revert back to the default version.

Avoid amending the original files directly in the `/wp-business-directory-pro/templates/` folder, as these will be overwritten when new updates are released.

10.2 Modify The Code

All files in your new theme template can be edited. You can add/edit or remove HTML code, add extra HTML / javascript functionality and more. Please note there are various references to PHP variables and functions in there. Modifying or removing these may break your theme. You should avoid editing the PHP code unless you are PHP savvy.

Also please ensure to retain the “Version Number Check” section of the template files. These are the first 7 lines of code in each of these pages, that start similar to the below:


This code is required to detect which version of the template you are using (see “Checking Compatibility” below).

10.3 Modify The CSS

CSS pages accompany each of the template pages, and just like the template pages they can be modified to suit your needs. As with the rest of your customised template files, these will not be overwritten when the plug-in is updated but they do contain a “Version Number Check” in the top 2 lines of code. Please don’t remove these, and update them when necessary.

You may choose not to amend the CSS files, but rather just make your required style amends directly to your theme’s own style.css file. This is fine too.

10.4 Checking Compatibility

While we try to avoid modifying the core template files when we update the plug-in, sometimes this is unavoidable. Therefore you may find that a future plug-in update will contain a newer version of one or more of the template pages, so you may need to modify your own custom template files as and when they predate newer core versions.

We have simplified this checking process for you. In the admin area navigate to WPBDP -> Custom Theme Files. This will crawl through all your customised files and compare them with the latest core theme files. Out-of-date theme files in your own customised template will be indicated here. You will then need to compare it with the new core template page, and make any necessary amends.
Once you have updated your customised template page be sure to update your own “Version Number Check” at the top of the page so that it matches the new core template version number.

For example, the latest plug-in may have a new version of the “/user-businesses/wpbdp-feature-page.php” template file – in this example the version number of this page is now V1.1 but your customised version is only V1.0. You would then compare these two files and look for changes. Let’s assume there was a typo in V1.0. You notice the typo has been fixed on the latest core template version of the file and that there are no other changes. You would then make the same change to your version of this template file and then change your own “Version Number Check” to “V1.1”. Resave your file and upload it back to your customised theme folder (remember, it’s inside your theme’s folder under the folder name “/WPBDP” – in this case it would be in the sub folder “/WPBDP/user-businesses/”). Now if you refresh the “Custom Theme Files” page in the admin area you will notice that your theme page is no longer flagged as out-of-date.

Still have questions about the plug-in? Feel free to leave a message on our Support Forum and we’ll help out as much as we can.