Home › Forums › Calendar Products › Events Calendar PRO › Conflict with Custom post type embedded in theme
- This topic has 12 replies, 3 voices, and was last updated 6 years, 5 months ago by Cliff.
-
AuthorPosts
-
October 22, 2017 at 6:13 pm #1367372LaleniaParticipant
Hi, I am using a theme made by IMI Themes. They use a custom post type of ‘event’ and it has known conflicts with The Events Calendar PRO (which I recently purchased). I am having trouble getting them to play nice – basically I want to disable the built-in events and use TEC PRO.
I have tried commenting out various lines in the theme files and have gotten the ‘events’ CPT to disappear from the dashboard – but I can’t get TEC PRO to work properly. Switching the theme to Twenty Sixteen gets TEC working properly.
Any help would be appreciated. Thanks.
https://themeforest.net/item/adore-church-responsive-wordpress-theme/10394132/comments?page=7 (this is not the exact theme I’m using, but it has a similar codebase shared between the themes)
October 23, 2017 at 8:35 pm #1367853CliffMemberHi, Delinda. We don’t normally provide support for troubleshooting with various themes, but I’d guess this should be an easy fix. Please send me a .zip of the theme in a Private Reply (which cannot be done via email replies) and I’ll take a quick look.
October 24, 2017 at 8:04 am #1368070LaleniaParticipantThis reply is private.
October 24, 2017 at 9:39 am #1368199CliffMemberI found the ‘event’ post type registered in this file: /wp-content/themes/Gaea/imic-framework/custom-post-types/event-type.php
I’m unsure how or why the ‘event’ custom post type would conflict with ours, since ours is a different custom post type. Here’s a snippet that should remove the theme’s own ‘event’ custom post type:
function remove_gaea_theme_event_post_type() { unregister_post_type( 'event' ); } add_action( 'init', 'remove_gaea_theme_event_post_type', 50 );
Please let me know how this goes for you.
October 24, 2017 at 11:16 am #1368267LaleniaParticipantThis reply is private.
October 24, 2017 at 4:05 pm #1368387CliffMemberI’d try wp-admin > Events > Settings > Display tab > Template
October 24, 2017 at 8:02 pm #1368439LaleniaParticipantThanks Cliff! Getting really close now. I changed to the Default Events Template and was able to smash some of the code from my theme’s template in to get it looking pretty good.
The one outstanding issue I’m having is using my child theme folder. If I put my new default-template.php in the plugins/the-events-calendar/src/views, or in my theme’s tribe-events folder, it works. But if I put default-template.php in my child theme’s tribe-events folder, it doesn’t work.
Any suggestions?
Thanks!!October 24, 2017 at 9:37 pm #1368456CliffMemberGreat!
Did you put it at [your-child-theme]/tribe-events/default-template.php ?
If yes, do other theme overrides (https://theeventscalendar.com/knowledgebase/themers-guide/) in that tribe-events directory work but this one doesn’t?
October 25, 2017 at 8:20 am #1368652LaleniaParticipantYes, that’s where I put it. Other child theme overrides that I’ve previously put in the child theme folder work but I haven’t tried any others in child theme/tribe-events. Guess I will have to give it a shot.
October 25, 2017 at 11:16 am #1368821CliffMemberI verified it works on my end… but only if ‘Default Events Template’ is selected in Events -> Settings -> Template -> Events Template.
Are you sure you wouldn’t prefer to use one or more of our action hooks? What are you trying to do?
Maybe our https://theeventscalendar.com/extensions/calendar-widget-areas/ extension would serve you quite well?
October 26, 2017 at 9:38 am #1369398LaleniaParticipantJust trying to get the ‘events’ portion of my site looking like the rest. It’s not perfect now, but it will do. Thanks for all your help.
October 26, 2017 at 8:39 pm #1369785CliffMemberI’m glad I was able to help. Have a great Friday!
-
AuthorPosts
- The topic ‘Conflict with Custom post type embedded in theme’ is closed to new replies.