Support

Home Forums Event Espresso Premium Insert links in single event page

Insert links in single event page

Posted: April 8, 2016 at 1:31 pm

Viewing 6 reply threads


Marstals

April 8, 2016 at 1:31 pm

How do i insert a simple link in the single event page? I Can’t find the right file to edit.

I want to insert a couple of links just underneath the event image. http://marstals.global-image.dk/courses/economics-as-management/

I want the same links to appear on every single events page.

How do i do this?


Josh

  • Support Staff

April 8, 2016 at 2:31 pm

Hi Marstals,

In this case you wouldn’t edit any files inside Event Espresso, instead you use an action hook to add the links. So for example, you can add some html links just before the ticket selector by adding this code to your website’s theme or a custom plugin:

add_action( 'AHEE__ticket_selector_chart__template__before_ticket_selector', 'ee_add_links_before_event' );
function ee_add_links_before_event() {
    if ( ! is_admin() ) {
        echo '<a href="http://example.com">My link</a><br>';
        echo '<a href="http://another.com">Another link</a>';
    }
}

You can add the above to a functions plugin or into your WordPress childs theme’s functions.php file.


Marstals

April 20, 2016 at 10:47 am

Thank you very much for your reply. Is it possible to add it to the very top of the page. Above the image?


Lorenzo Orlando Caum

  • Support Staff

April 20, 2016 at 11:01 am

Hello,

The featured image area does not have an action hook so the links can’t be added there using a similar function.


Lorenzo


Marstals

April 20, 2016 at 11:04 am

Is there any way, that i manually ca add it there? it is very essential to my site, that i am able to do so.


Marstals

April 20, 2016 at 11:06 am

And i would like to insert some text at the very bottom of the page as well. I would like this text to be displayed on every single event page as well


Lorenzo Orlando Caum

  • Support Staff

April 20, 2016 at 1:18 pm

Hi,

I found another action hook that will get those links to the top of the page. Try this version:

https://gist.github.com/anonymous/adc8728dc17b13aff834ced572f69a44

The second one will add a message towards the end of the event area.

edit – correct typo


Lorenzo

Viewing 6 reply threads

The support post ‘Insert links in single 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.

Event Espresso