Configuring The Events Calendar With Constants

Every time WordPress runs, a number of key settings are loaded into memory, such as details about how to connect to the database. These settings are generally defined as constants within the wp-config.php file, and it’s entirely possible to change or add to them in order to tweak WordPress and modify it’s behaviour slightly.

If you are reading this it won’t come as much of a surprise to learn that The Events Calendar can also be tweaked simply by defining some new constants within wp-config.php.

What I am going to look at in this article is each of the six constants that can be used to fine tune The Events Calendar – though one is deprecated and really we are only documenting that for completeness (and for the benefit of anyone working on an older installation, where an update has not been possible for whatever reason).

Now, as I alluded to at the start, some pretty critical information is stored in wp-config.php (database credentials, for instance) so it is imperative that you make a copy of this file before you start editing … just in case. The constants we will look at are:

Defining constants is straightforward:


Noting that, as is conventional, the name of the constant is all uppercase. Don’t make the mistake of changing this to lowercase or anything else. Here’s an example:

You can see that in the above screenshot I have defined TRIBE_SHOW_EVENT_AUDITING and TRIBE_HIDE_UPSELL, setting both to true. It’s that easy.

Show Event Auditing

The first constant I am going to look at is TRIBE_SHOW_EVENT_AUDITING. Now by default this is set to false, so you only need to define it in wp-config.php if you wish to change this to true. The purpose of this setting is to add (or hide) auditing information – allowing you to track edits made to any of your events.

Screenshot showing the audit trail for an event imported by Facebook Events then edited by the core Events Calendar plugin

If you do this some additional information will become visible in the event editor showing an audit trail relating to event edits (you will see the audit trail just below the event cost field).

The primary benefit of this is that when you have multiple add-ons you can see which has implemented a change and when that happened. In the above example, the event was imported from Facebook (facebook-importer) then edited after the fact (events-calendar). If any strange data issues crop-up — whether overwrites or something else — it is then much, much easier to get a bead on what caused the problem.

Removing Upsells

The next two constants, TRIBE_HIDE_UPSELL and TRIBE_HIDE_SHOP are closely related and could be useful if you are managing a site on behalf of a client. Setting either of these to true within wp-config.php will remove the Event Add-Ons link from the Events menu.

Screenshot showing the menu with upsell items and without

The difference between the two constants is the TRIBE_HIDE_SHOP simply removes the entry from the menu: TRIBE_HIDE_UPSELL removes all references to the Tribe add-on shop. In the above example, you can see that Event Add-Ons has been removed from the menu on the right.

You should also bear in mind that we will very likely merge these constants in a later version (and will update this documentation accordingly when we do). You should also see our article on Removing the Add-On Upsell.

Disable Toolbar Items

Screenshot showing part of the WordPress toolbar with items added by The Events Calendar

By default, a handy menu is added to the WordPress toolbar allowing rapid access to various event pages and settings. This same menu may also populated with items by various add-ons (such as Community Events) if you happen to have them installed.

This isn’t always desirable, though: it might be that your toolbar is already crowded with menus added by other plugins or it could just be that you need to keep things as simple as possible for your client.

As you’ve probably guessed, we have also made it possible to disable this by means of defining a constant:


PUE Update URL

This constant, PUE_UPDATE_URL is quite simply the URL used to check for updates. Generally speaking there is no need to change this, however if we ever moved our update systems to a different domain (which is unlikely) it’s possible that you would need to define this to continue receiving updates.


As promised, this is the extra constant you can safely ignore: PUE_ALWAYS_CHECK. It is no longer used and setting it to true, false or anything else will have no effect. It is however possible that you may see it kicking around on older, legacy installations and for that reason we are documenting it here.

By default it was set to false, but on setting it to true it meant that PUE (which manages updates for our premium plugins) would always be checked for updates — not just once a day and when forced, as was normal.

We hope this was of value to you. If there’s another constant you think might be worth adding, or have questions about any of those outlined above, let us know. Thanks for reading and for your use of The Events Calendar.

Modern Tribe Newsletter

Insight, Discounts & Notices for People Who Kick Ass..