Posted: September 28, 2014 at 3:51 pm
|
Hey! So I am noticing that the event entries in EE4 display as blog posts. I want to camoflague this and make it appear as though they are not blog entries. Is it possible to create a second index.php file for only the EE events to display in? My php knowledge is fairly limited. Can I create a wordpress theme template just for single EE event entries? How would I go about telling EE where to find this theme template? |
Hi Steve, There are two ways to adjust this: 1) You can use CSS and target single event pages to hide the post meta information (post date, author). 2) You can create a new theme template for Event Espresso. For option two, a single-espresso_events.php will be needed. Login to your WordPress root with your preferred SFTP or FTP client. FileZilla and Cyberduck are both free options. Next browse to this location: wp-content/themes/yourthemefolder You should now be viewing the contents of your theme. Locate a page.php file and duplicate it. Then rename to single-espresso_events.php. Now open the file for editing. Towards the middle of the file, you should see a call for the content. Here is an example: Change it to this and save changes: — |
|
|
I did as your instructions said, however I didn’t see this code in my template:
So I put this:
Where I thought it should go and it displayed as text in my template. The page header is working properly though and includes the event title in it. |
Hi, That was an example from the default WP themes (WP twenty fourteen), however the principle is the same for other themes. Are you seeing any lines of code that might be similar to that? — |
|
|
OKay I seemed to be able to get the Event description to show up, now how do I get the datetimes to display? |
That information should appear. What is the name of your theme? — |
|
|
Well it isn’t appearing. You can see that in the screen cap: http://sandbox.bramongarciabraun.com/wp-content/uploads/2014/10/screencap.jpg Our theme is a custom one. |
|
The theme name is BGBstudio 2 |
Okay, lets go back to this: Could you upload the contents of that file to pastebin and then link to it here? — |
|
|
|
Hi Steve, While I do not have a copy of your theme to test this, I can point you in the right direction. On line 13 of your template, where you have this:
It should be this instead:
Along with that, please be sure that the file name of your template matches this name exactly: single-espresso_events.php |
|
The support post ‘Change the theme template that the event posts display in’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.