Oh, and, actually, hooking the filter to the_title isn’t right either. It will replace all titles on an event page with whatever the filter produces.
For me this turns my nav menu into:
Events – Events – Events – Events – Events
Hooking the filter to the ‘single_post_title’ hook seems like a better idea. Put this in your functions instead:
add_filter ( 'single_post_title', 'em_content_page_title',10,1 );
remove_filter ( 'wp_title', 'em_content_page_title',10,1 );
Ah, OK. Changing events to posts seems like a really good move (though a lot of work!). Then you don’t need the filter at all, right? 🙂
Thread Starter
Cars10
(@shonu)
changing events to posts will solve this
May I ask carefully, how I can do that ?
Reading this I am getting a bit confused.
Thanks
Shonu, Marcus is rewriting the Events Manager plugin so that it will use what’s called a “custom post type”.
This will mean that events will just be a type of post within WordPress.
This change will happen in a future version of the plugin.
Thread Starter
Cars10
(@shonu)
I see. Thanks for clarifying.
I assume the post would be containing all the properties (“Attributes”) that a current event handles (everything around the content of the event, Start, end date, Location, etc.)
If such a post type will have templates as current events have, then this sounds good.
Sounds like a 5.0 version …