Support

Home Forums Event Espresso Premium How to put Jetpack Sharing below the registration section on single events

How to put Jetpack Sharing below the registration section on single events

Posted: May 10, 2016 at 2:56 pm


Marcia Chadly

May 10, 2016 at 2:56 pm

I was able to set up Jetpack Sharing to display on single event pages below the content based on this post.

However, I want the Sharing section to show up below the registration section but cannot find the action hook for this in the documentation. You can see the problem on this page on my site where the Facebook Like button is below the registration section but the Sharing section is above.

Would you please advise? Thank you.


Lorenzo Orlando Caum

  • Support Staff

May 10, 2016 at 4:47 pm

Hello,

Towards the end of the sample function in the tutorial, you’ll see this:

AHEE_event_details_before_the_content

Try using this instead:

AHEE_event_details_after_the_content


Lorenzo


Marcia Chadly

May 10, 2016 at 9:21 pm

Hi Lorenzo,

I already had “AHEE_event_details_after_the_content” in the function. The trouble is that the Sharing buttons were above the registration button using this hook. I want them below the entire registration section. Is that possible?

Thanks


Lorenzo Orlando Caum

  • Support Staff

May 11, 2016 at 5:30 am

Alright, are you wanting them at the end of the event page?


Lorenzo


Marcia Chadly

May 11, 2016 at 10:42 am

Yes, at the end of the event page.
Thanks!


Lorenzo Orlando Caum

  • Support Staff

May 11, 2016 at 6:47 pm

Hello,

Please try this one instead:

AHEE_event_details_footer_bottom

That will position it at the end after the event description, ticket selector, etc.


Lorenzo


Marcia Chadly

May 11, 2016 at 8:30 pm

Hi Lorenzo,

When I use

AHEE_event_details_footer_bottom

the Jetpack sharing does not appear on the page. When I had used

AHEE_event_details_after_the_content

the Sharing section was present in a div: <div class=”sharedaddy sd-sharing-enabled”> above the registration section. However when using “AHEE_event_details_footer_bottom” that div is not present anywhere in the HTML when I view the page source, as on this page.

I double-checked the code in the functions.php file.

Please advise.

Thank you!


Josh

  • Support Staff

May 12, 2016 at 9:38 am

Hi there,

The closest hook points to where you want to show those buttons are:

AHEE__ticket_selector_chart__template__after_ticket_selector

AHEE_event_details_after_post

The first one will put the buttons between the ticket info and register button, the second one will put the buttons after everything.


Lorenzo Orlando Caum

  • Support Staff

May 12, 2016 at 9:48 am

Hi, I tested this out and these locations are available:

Closest to the ticket selector:

AHEE__ticket_selector_chart__template__after_ticket_selector

End of event page:

AHEE_event_details_after_post


Lorenzo


Marcia Chadly

May 12, 2016 at 11:45 am

Thanks, Lorenzo.

The “AHEE__ticket_selector_chart__template__after_ticket_selector” does not work as it puts the Sharing section between the ticketing text and the registration button, not below the registration button. The “AHEE_event_details_after_post” worked with some CSS adjustment to the page.


Marcia Chadly

May 12, 2016 at 11:46 am

Ideally, we would have liked the Sharing section just below the registration button and not at the very bottom of the page.


Marcia Chadly

May 12, 2016 at 11:48 am

Is there any way to add the Sharing section directly into a single events page template rather than using functions.php?


Josh

  • Support Staff

May 12, 2016 at 12:50 pm

Sort of, since there isn’t a single events page template to put code into, you add the code to the WordPress theme’s single.php template. The code you add to the single.php template is:

<?php if ( 'espresso_events' == get_post_type() && is_singular() && !post_password_required() ) {
    if ( function_exists( 'sharing_display' ) ) {
        sharing_display( '', true );
    }
} ?>

The support post ‘How to put Jetpack Sharing below the registration section on single events’ 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