There are many calendar plugins available for the WordPress Content Management System (CMS). When developing a web site it often depends on using a plug-in with the features for your web site and organizations goals. My preference is the Event Calendar by Modern Tribe. I have used both the free and paid version on different site with great success. For me the decision to use the paid version centers on the if your site needs recurring events and if you need more advanced widgets. You can read more on the Modern Tribe site. The purpose of this article is to look at the Page template selection to display a full calendar in a WordPress site using the Genesis Framework in a full width page.There are two problems to overcome using Event Calendar with Genesis:
- First, Genesis does not ship with Full Width Page Templates (no sidebar)
- Second, Event Calendar does not use shortcodes to embed a calendar into a page of a post.
Both problems are not problems per se, but require a different approach. Event Calendar does not use a page/post to display a calendar because it uses calendar feeds to display data (i.e. mydomain.com/events), that also doubles as a RSS feed. In Event Calendar’s settings, there is an option to either select your themes page template, or use one supplied by Event Calendar (with its own settings).
Genesis, instead of using a different page template, allows the user to set a default sidebar configuration throughout the site and at the same time allow the editor to override that setting per page or post (see Screenshot 1). This gives the site administrator a lot more flexibility, in my opinion. The question becomes how do you use the flexibilities of Genesis along with the flexibility of Event Calendar’s feed?
So why is it so important to display a calendar in full width view? For me it is just personal preference. A calendar grid displayed on a page with a sidebar (see Screenshot 2) has a crunched compressed appearance, and can make displaying event titles problematic. I prefer display a calendar in a full wide page.
Their are several approaches to the problem but I will show you one that I have used on a clients site recently. Namely, by creating a function that checks if an Event Calendar Month view or Event list is being displayed on the page. This function adds the needed functionality, while using the power of Genesis Frameworks extensibility.
Copy the following function and place it at the end of your themes functions.php file. Remember to remove the tag “<? php” from the function below you you will receive errors. Credit needs to go to Jonah Coyote for his great page on Event Calendar customization in the Genesis Framework. I have modified his function to include a check for calendar page/feed that displays a calendar or event list and not check for the front page (personal preference). It then sets the Genesis Layout to full width if their of those conditions are met.
The results, a full width calendar page that is easy to read.