Last updated: 9 months ago
EventON with single event template layout files ready to go for single event page. But not always this template will look like your other single post or page layout because each and every wordpress themes are build differently.
Here is how to override the layout of single event page to match you need: (you will need FTP access to your webserver and text editor to edit php files)
Step 1: Figure out which template file you want the single event page layout to look like.
If you want the single event page to look like a regular page in your theme you will need page.php file.
If you want the single event page to look like an individual blog post you will need single.php file.
Create a folder called eventon in your theme folder. So the file path would look like this: ….wp-content/themes/<–your-theme-name–>/eventon/
From your theme (wp-content/themes/your-theme-name) copy the file you choose on step 1 into this eventon folder. (Make sure after copying the file exist in both places)
Step 4: Open this file from a text editor.
You can either copy this file to your computer folder and edit it as mentioned in below steps and upload or some ftp clients allow you to edit files and resave it back to the same place in your server. Whichever you choose, open this file in a text editor. For windows Notepad++ is great for this and for mac sublime text is awesome.
In this file (single.php or page.php) you should see a php code that grabs content for this template page. Which could differ from theme to theme, so I can not say what this will look like. It could be something like the below variations:
<?php echo get_the_content();?>
Go ahead and comment this line out or remove it.
NOTE: if you do not see this content php code in the template file look for get_template_part() in this case you will need to open the template part file and copy that content and paste it instead of this.
On the top of the page above any header functions (eg. get_header()) paste the below PHP code
$oneevent = new evo_sinevent();
Instead of the above mentioned line paste the below php code in the same spot.
<?php $oneevent->page_content(); ?>
Make sure you are not pasting this inside a php code block (or else it will break) Paste this code outside a php block or paste just the function if you are pasting this inside a php block.
Where you want the sidebar to appear (usually inside a div container) place the below PHP code
<?php $oneevent->sidebar(); ?>
Re-save or replace this new file back into the eventon folder in your serve and replace the file name to single-ajde_events.php
Step 8: Style issues
If the new sidebar is not correct in place or is skinnier than it should be: that could be due to the CSS styles for that div container for the sidebar. You can add overriding CSS styles to fix this following below link.override css styles
And that should do it. Single event addon look for template for the single event page in the below order