Support

Home Forums Event Espresso Premium Add Default Text at bottom of each Event.

Add Default Text at bottom of each Event.

Posted: August 25, 2015 at 1:07 am

Viewing 7 reply threads


Ian

August 25, 2015 at 1:07 am

I’d like to have some standardized text show at the bottom of each event by default. Is there a simple way to do this, have text the at bottom of the loop or after the loop?
A similar question also is what is the easiest way to rearrange the order in where things appear within an event, eg. having the event info show at the bottom and not the top.


Dean

August 25, 2015 at 5:36 am

Hi Ian,

You can use one of the action hooks, e.g.

do_action( 'AHEE_event_details_after_post', $post );

As an example, you could add the following to a site specific plugin (https://eventespresso.com/wiki/create-site-specific-plugin-wordpress-site/):

function add_some_text($post) {

echo '<div><p>Some text</p></div>';

}
add_action('AHEE_event_details_after_post', 'add_some_text');

Regarding the re-arranging of the event sections, you can do this with some filters, see here: https://gist.github.com/joshfeck/1151c89082ccb5c0b478

The options (Events > Templates tab) also provides ways to hide certain sections on an event without code.

Also see here: https://eventespresso.com/2014/02/developers-corner-theming-event-espresso-4/


Ian

August 25, 2015 at 7:27 am

Thanks Dean, worked perfectly. will look into other pages, hoping I can use css for everything.


Tony

  • Support Staff

August 25, 2015 at 7:55 am

Hi Ian,

I’m glad that’s working for you, as for using css it all just depends on what it is you want to move/change.

If you have trouble moving something around just let us know 🙂


Ian

August 25, 2015 at 6:14 pm

Have run into a problem, see here http://cleanhealth.com.au/events/inutrition-pro-level-1-sydney-september-2015/

Please read our refund policy here
For further assistance on our education courses please contact our administration team on +61 2 8094 9804 or email at: admin@chfi.com.au and the paypal image should show at bottom and it does.
It is showing where its supposed to, but now its also showing directly after the Payment shortcode, messing up my whole payment area. (I have to add cart66 subscribe button there for part payments)
Hooks and modifying php is not my strong suit.

Hope you can help.


Tony

  • Support Staff

August 26, 2015 at 2:51 am

Hi Ian,

So is it this section that should not be showing? http://take.ms/KT8sZ

Or the one right at the bottom of the page? http://take.ms/wNGRg

I’m assuming you used the function Dean provided to add that in yes? Can you add the full code you are using here please?

We recommend using a service such as pastebin.com and adding the url here for us to view.


Ian

August 26, 2015 at 7:18 am

The correct one is right at the bottom.

here is code: http://pastebin.com/PM4dXvZ7


Tony

  • Support Staff

August 26, 2015 at 8:15 am

As a quick fix, change your code to use the ‘AHEE_event_details_after_venue_details’ hook.

Note this only fires if your event has a venue assigned to it and you are displaying venue detail, the event you linked to does.

So change this line

add_action('AHEE_event_details_after_post', 'add_some_text');

to this

add_action('AHEE_event_details_after_venue_details', 'add_some_text');

How have you changed the layout of the single event page? Are you using custom templates or a function to alter the order?

Viewing 7 reply threads

The support post ‘Add Default Text at bottom of each Event.’ 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.

Event Espresso