Posted: November 7, 2016 at 11:17 am
|
Hello, I would like to add terms and conditions text and some other general info to the bottom or each event listing page. I have the page displaying in this order, date times, description, tickets, location. And I would like to put at the bottom, under location a few paragraphs of text. What is the best way to do this? |
You can probably achieve this using the Advanced Custom Fields WordPress plugin and some custom hooks. We published a tutorial on adding a sponsors section that might help: |
|
The best way depends on the contents of the information. For example is the information going to be the same across all events, or does it need to be unique to the event? |
|
|
It would be the same info on every event. |
Hello, The following action hook could be used: AHEE_event_details_after_post There is a sample function in this support post (https://eventespresso.com/topic/add-default-text-at-bottom-of-each-event/#post-169832). It can be added to a site specific plugin (https://eventespresso.com/wiki/create-site-specific-plugin-wordpress-site/) and then you can edit the messaging to replace “Some text” with your actual messaging. Another idea is to use a terms and conditions question during registration checkout which will then become part of each registration record: https://enzo12.com/training/create-terms-conditions-question-event-espresso/ — |
|
|
thanks, that action hook worked. It was also adding it beneath each event in the event list but I removed it there with css. |
If you only want the output to be shown on the single event pages you can wrap the output from the function within:
That’s should prevent the content from being output on the event lists so you don’t need to hide it. |
|
|
Thanks Tony. I don’t really know php. I am just faking it. Would the code be like this? if( is_single() ) { function add_some_text($post) { echo ‘<div><p>Some text</p></div>’; } } |
Nope, the other way around, like this:
The ‘add_some_text’ function is ‘hooked’ in into the ‘AHEE_event_details_after_post’ hook at the bottom, which basically means run that function when the hook is fired. So within add_some_text you check if you are on a single page using:
Witihin the brackets you do whatever it is you want to do if your on a single post, in this case output some text. Make sense? |
|
|
Yes, it does. Thanks for the explanation. |
You’re most welcome 🙂 |
|
The support post ‘adding a custom summary field at end of event page’ 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.