Support

Home Forums Event Espresso Premium Edit Link on Single Event Page

Edit Link on Single Event Page

Posted: March 1, 2017 at 5:57 am


Elnino

March 1, 2017 at 5:57 am

Everything is in the title. This issue has been addressed in the following topic (dated 2015) but isn’t fixed yet or am I missing something?

https://eventespresso.com/topic/edit-link-on-single-event-page/

Thanks for your feedback.


Tony

  • Support Staff

March 1, 2017 at 6:10 am

Hi there,

The edit link was Lorenzo mentioned in the above thread has already been added to the admin bar.

When viewing the event on the front end, go to Event Espresso -> Events -> Edit event – http://take.ms/Vmy4F

Is that what you are looking for?


Elnino

March 1, 2017 at 6:17 am

Yes but it’s not showing on mine: https://www.screencast.com/t/3xRQ5ig9Z
I’m logged in as administrator. I’ve tested it by deleting the theme file single-espresso_events.php but I still have the same prob.


Tony

  • Support Staff

March 1, 2017 at 6:18 am

What version number of Event Espresso are you using?

Template files such as single-espresso_events.php should not have any effect on the admin bar so that shouldn’t make any difference.


Elnino

March 1, 2017 at 6:22 am

Version 4.9.30.p


Tony

  • Support Staff

March 1, 2017 at 6:33 am

Hmmm, so there are 3 checks before that link is included.

if (is_single() && (get_post_type() == 'espresso_events')) {

And also a capability check to make sure you have the ee_edit_event capability on your account.

I’m assuming you can edit that event fine within the admin?

If you temporarily switch to one of the default themes such as twentyfourteen and view that event can you see the link then?

If you’d rather not actually switch the theme on the live site you can use a plugin such as Theme Test Drive which allow you as the admin to view another theme without actually switching to it.


Elnino

March 1, 2017 at 6:42 am

I do indeed see the link when switching to a default theme. What can we have forgotten in our theme to prevent this link display?


Josh

  • Support Staff

March 1, 2017 at 10:32 am

That is_single() check might be failing because there’s also a list of related events on that page. If you temporarily remove the code that displays the list of related events does the link appear?

One thing you can do that will help is you can add this code directly to your custom single event template:

<?php edit_post_link(); ?>

You add that code to where ever you want the edit link to appear.


Elnino

March 1, 2017 at 10:51 am

Removing the list of events code didn’t change anything. I’ve used your PHP code and it works great. Thanks!


Josh

  • Support Staff

March 1, 2017 at 11:28 am

You’re welcome.

The support post ‘Edit Link on 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