I am using hidden link on two sites - one just launched, one in development.
My issue is with recurring events.
The recurring event has its own post type, "event-recurring". After creating a recurring event, it generates individual events, post type "event", which are actually displayed on the site.
I can associate a Layout with an "event" without a problem when creating a (non-recurring) Event directly. But when I create a recurring event (or edit an existing recurring event) the subsequent events that are created/updated do not have the Layout assigned.
Is there some way that I can force the Layout assignment for these event posts that are generated from a event-recurring post?
If I can provide more information to make this more clear please let me know. Thanks as always for your help.
Where:
- Replace 'post-type-slug' with your required post type slug
- Replace 9999 with the required layout ID you want to render with that post type posts
I hope above solution will help you to resolve your issue.
If the Events Manager plugin is programmatically generating the event posts it seems like the hook used by Layouts to assign the template is being missed.
I haven't looked at the Events Manager code but I assume they will be creating the event posts using standard WP functions, e.g. save_post.
In which case it should be possible to use the save_post_event hook that is triggered whenever an event post is saved or updated to set the Template Layout, which is stored as post_meta with a key of _layouts_template.
So you could add the following code to your site (editing the slug of the required layout):