Posted: October 28, 2015 at 8:43 am
|
I am attempting to discover how to move the event description above the ticket options in the single event template. I have done a number of searches on the forums and in the documentation, but all responses to this question say either, “use CSS” (which won’t work in this case), or “it’s like WordPress’s CPTs”, which is completely useless. I’m trying to discover which specific file spits out the content I’m trying to move, and whether or not I’m supposed to apply it to my child theme’s directory. Is this the file: That I need to edit? To edit it, do I simply copy it to my child theme’s main directory, and it will be loaded by WordPress automatically? If that’s not the right file, or process, please could you outline the specific steps I need to take, to get my event description to appear *above* the ticket options. |
Hi there Ryan, We are working on a drag and drop option that will let you reorder those elements on the event page. For now, you could use a filter to rearrange the content. Here is an example that could be added to a child theme’s functions.php file or a site specific plugin: https://gist.github.com/lorenzocaum/a33405557a2a065779ea — |
|
|
Thank you very much for that link. I have decided to follow the steps for the alternative version, where you create child-theme files. I have done this; however, after uploading the files (with the only changes being made to content-espresso_events.php being that I added titles above the content areas, I have noticed that when loaded, the page no longer inserts the same CSS classes as it did when the files were not in my child theme’s folder. IE: the .post class is no longer being applied to the article tag on the page, and as a result, none of the other styles that rely on that class are being applied. Example of a blog post that correctly displays the styles: Example of the event not displaying correctly: As you can see, there are margins missing, font sizes are too large, etc. When I delete the 2 files I’ve added here, the .post style appears in the article tag, and the event displays as expected (albeit with the content in the undesired order). Do you know why this may be happening, and how I may remedy it? |
Hi, I’m not sure why that is happening. Could you give the first option a try instead? That will be a temporary workaround until our drag and drop feature has been finalized. — |
|
|
When will the drag and drop feature be released? The problem is, we are required to relaunch the website this week. I must have both the styles in place, and the custom template (including headings). I cannot use the first method, unfortunately, as it doesn’t allow me to insert headings between each section. Is there someone there who can help troubleshoot why the .post class is no longer being added? |
Hi Ryan,
This won’t be release for a little while yet. The reason the .post class is not output within EE events is that are not of post type ‘post’, they are post type ‘espresso_events’ so that’s the class that is added when using post_class() Now because your basically taking over the output from Event Espresso when using the methods Lorenzo linked to, you can easily fix this. One way is to simple edit the template Lorenzo linked to, content-espresso_events.php Notice this line:
Add ‘post’ to the beginning of $event_class, like this:
You are then adding in the ‘post’ class when using the template for EE events. However your theme wraps the content sections within other divs to add padding, which means you’ll need to edit the template further to include those divs for this to work. |
|
Hello again Ryan, As of Event Espresso 4.8.21, there is a custom display re-order option available in the WordPress dashboard. Backup your WordPress and update your software https://eventespresso.com/wiki/how-to-back-up-your-site/ You can see the change log for Event Espresso 4 here: https://eventespresso.com/wiki/ee4-changelog/ Remove existing filters for adjusting the order If you have used some of the suggested filters to adjust the order of your event elements, then you’ll want to first remove those from your website and they may have been added to your child theme’s functions.php file or a site specific plugin. Set a custom order through the Templates screen Afterwards, go to your WP dashboard (WP-admin) –> Event Espresso –> Events –> Templates. The Use Custom Display Order options in the Templates screen can be used to reorder the events elements on the single event page as well as the events listing page. Again, be sure that any of the filters for adjusting the order have been removed from your site specific plugin or your child theme’s functions.php file before turning on the template reorder option. Otherwise, you may see duplicate content. Thanks — |
|
The support post ‘EE4 Need to customise single event template’ 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.