Hi Vincent,
That’s actually something that’s generated by your WordPress theme, rather than Events Manager. The theme almost certainly uses the edit_post_link function to generate the link.
The url you mentioned with event_id in it wouldn’t work.
Thread Starter
vince_
(@vince_)
Thanks for your answer. There is maybe a way to generate the URL I want by retrieving the event ID with the event name.
I will try to make it tomorrow.
Ok, but what I meant was that a URL in this format:
http://myurl.com/edit-events/?action=edit&event_id=6
won’t open up the event for editing in WP admin – unless there’s another part of your plan I don’t know about 🙂
Thread Starter
vince_
(@vince_)
Sorry, I’m not sure what you mean by “event editon”
hi,
did you mean disable event editor in WP admin? or disable editing events when normal users/subscriber login? how about turning-off edit_events at Events > Settings > General > User Capabilities ?
Thread Starter
vince_
(@vince_)
Hi,
When a user creates an event and is logged in, he can click on :
editthisentry.jpg
the link is :
http://myurl.com/wp-admin/post.php?post=179&action=edit
I just don’t want the user to get into the WP administration but instead use this editor :
http://myurl.com/edit-events/?action=edit&event_id=6
I see, maybe you can this snippet in your theme functions.php
add_filter( 'get_edit_post_link', 'my_edit_post_link', 10, 3 );
function my_edit_post_link($url,$post,$context){
$url = "http://google.com";
return $url;
}
note: this is not tested and based on thread – http://stackoverflow.com/questions/14678435/how-to-change-the-url-of-the-edit-post-link
Thread Starter
vince_
(@vince_)
Thank you for your great support, here is the solution :
add_filter( 'get_edit_post_link', 'my_edit_post_link', 10, 3 );
function my_edit_post_link($url,$post,$context){
$EM_Event = em_get_event($post, 'post_id');
$url = "http://myurl.com/edit-events/?action=edit&event_id=".$EM_Event->event_id;
return $url;
}