Send Email on “Submit for Review”

When you have a contributor or some other role that can create posts but not publish them they need to “Submit for Review”. Well of course if the admin doesn’t know this is submitted then…they wont know it has been submitted. So let’s notify them!

You’ll notice I am only sending this email if the user role is ‘agency’ and the post type is a ‘tribe_event’ so that we are not spamming the admin with these.

Controlling Event User Access

Recently we had a client that needed to allow 1 role to be able to create events (we suggested a front end form but they opted for the admin area) and ONLY be able to create events (using the Tribe Events plugin). This was actually more tricky than I thought it would be…mostly because I was my own worst enemy.

So first I installed the plugin Adminimize (which I love now) and that took me a good deal of the way (after checking all the things they should not see). However it still seemed possible for the user to navigate away from the events area if they knew how. So I needed to add some further restrictions in the functions.php file.

Here is that function:


Import Events into Tribe Events

Sometimes I need to move events from an old DB into WordPress as Tribe Events. This can be a tricky task since most DBs do not store their information uniformly and definitely they do not store them with all the information fields needed by Tribe Events. Still, you have to do what you can. Here is my attempt at moving events from an old DB (not made by me and, imo, super crappy design) into the Tribe Events (also not made by me and only a somewhat crappy design)

Just put this in a php script and run it and you should be all set. Of course you will need to modify it to pull information from your old events database.

Events Calendar Breadcrumbs

Sometimes we need breadcrumbs on our event calendar pages. This function will do that.

Now just call it in your theme where you want it. I put it in the /theme/tribe-events/default-template.php file.

Normal Site Title on Events Page

Tribe events will often break / change the site title. If you want to set the main events page title to appear similar to the titles listed on the rest of the site you can use this function.


Always Navigate to Next Month

A client wanted to always go to the next month regardless of if an event existed or not.

Just need to hook into the ‘tribe_events_the_next_month_link’ filter like so: