Event Page Plugin How to Make It Work
To create a page that houses your events follow these steps:
- Navigate to your WordPress blog’s theme folder which should be found in /wp-content/themes/the-name-of-your-theme
- You’ll need to create a new template file entitled “events.php”
- To do this copy your file entitled page.php and name it events.php.
- Place the code in “Example 1” on the first line of the file.
- Remove the code that prints the page content and replace it with the code in “Example 2”.
- Upload the new file to the server.
- Now you’ll need to create a new page which you can title whatever you like.
- Assign this page to the template entitled “Events”
- Remember to alter your Event Page settings to reflect the new name of this page. Seesettings.
- That should be it. View the page and you should see the Event Page in its moderately useful glory!
Example 1
<?php
/*
Template Name: Events
*/
?>
Example 2
To implement this plugin you only need two lines of code. See below:
<?php
tern_wp_events();
?>
The first line of code initializes the plugin’s class. The second line of code prints your events to the page.
Connect with us
We dig the back-and-forth.