Child theme CPT templates no longer work

I’ve just realised that some recent update has completely changed the template structure inside the theme directory, so that my single post child theme templates for my two custom post types no longer work, all the custom posts just display a blank page. I wanted to roll back to a previous version of the theme but only the 1 previous version seems to be available. My structure is single-recipe.php and then framework>views>integrity>wp-single-recipe.php and content-recipe.php

I really need to fix this but I can’t figure out how this template structure needs to change.

Hi @instadesign,

Thanks for reaching out!

Would you mind sharing your admin credentials so that we can properly see your file structure? Please keep in mind that customization in the child theme is outside the scope of our theme support, all we can do is to guide you to the proper file structure. On the other hand, please give us the following information in a Secure Note.

  • WordPress Login URL
  • Admin level username and password

You can find the Secure Note button at the bottom of your posts.

Thank you.

Hello @instadesign,

I have checked your site and as it turns out, it is not the CPT template that is not working. There is actually a fatal error when viewing the single recipe post items:
**FATAL ERROR** : UNCAUGHT ERROR: CALL TO UNDEFINED FUNCTION TRIBE_IS_EVENT() IN /SITES/yoursite.NET/FILES/WP-CONTENT/THEMES/X-CHILD/FUNCTIONS.PHP:346 STACK TRACE: #0 /SITES/yoursite.NET/FILES/WP-CONTENT/THEMES/X/FRAMEWORK/LEGACY/CRANIUM/HEADERS/VIEWS/INTEGRITY/_BREADCRUMBS.PHP(17): X_BREADCRUMBS() #1 /SITES/yoursite.NET/FILES/WP-CONTENT/THEMES/X/FRAMEWORK/FUNCTIONS/FRONTEND/VIEW-ROUTING.PHP(180): INCLUDE('/SITES/REGATHER...') #2 /SITES/yoursite.NET/FILES/WP-CONTENT/THEMES/X/FRAMEWORK/FUNCTIONS/FRONTEND/VIEW-ROUTING.PHP(55): X_VIEW_ROUTER::RENDER('/SITES/REGATHER...', ARRAY, TRUE) #3 /SITES/yoursite.NET/FILES/WP-CONTENT/THEMES/X/FRAMEWORK/LEGACY/CRANIUM/HEADERS/VIEWS/INTEGRITY/WP-HEADER.PHP(18): X_GET_VIEW('INTEGRITY', '_BREADCRUMBS') #4 /SITES/yoursite.NET/FILES/WP-CONTENT/THEMES/X/FRAMEWORK/FUNCTIONS/FRONTEND/VIEW-ROUTING.PHP(180): INCLUDE('/SITES/REGATHER...') #5 /SITES/yoursite.NET/FILES/WP-CONTENT/THEMES/X/FRAMEWORK/FUNCTIONS/FRONTEND/VIEW-ROUTING.PHP(55): X_VIEW_ROUTER::RENDER('/SITES/REGATHER...', ARRAY, TRUE) #6 /SITES IN **/SITES/yoursite.NET/FILES/WP-CONTENT/THEMES/X-CHILD/FUNCTIONS.PHP** ON LINE **346**

Kindly fix the custom PHP code in your child theme’s function.php or at least temporarily remove the PHP code block so that you can check the CPT templates in your child theme.

Best Regards.

Ah, thank you Ruenel, yes I’ve commented out the Modern Tribe Events related breadcrumb code in functions.php and now my posts display fine again. Do you know if there is a more robust way to customise breadcrumbs in a way that won’t break things if a post type is deactivated?

Thanks,

Henry

Hi Henry,

Glad that the posts are showing again. Regarding the breadcrumb and the customization, I would suggest you go through the following article and can use the below listed free plugin from WordPress repository.



Hope it helps.
Thanks

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.