Notice: These forums are now retired and closed. For active support, please Submit a Ticket or visit our official WordPress.org community pages.
Kadence Theme | Kadence Blocks | Starter Templates | WooCommerce Email Designer | Ascend | Virtue | Pinnacle

projecthuddle conflict with theme

Home / Forums / Virtue Theme / projecthuddle conflict with theme

This topic is: Not Resolved
[Not Resolved]
Posted in: Virtue Theme
October 12, 2016 at 8:05 pm

Hi guys
wanted to report an incompatibility with projecthuddle.io plugin.

here is a vid showing the symptoms

contacted the developer and this is what he told me

Andre replied

Oct 12, 10:10pm
Hi Kaled,

Thank you! I was able to access the theme code to find the issue.

The issue is this theme doesn’t follow WordPress theme best practices. Instead of using template files like header.php, footer.php, it instead is hijacking the template_redirect hook and adding it’s template wrapping to every page indiscriminately. This is causing the template wrap to appear on ProjectHuddle’s project pages, even though it shouldn’t technically appear there. This makes it impossible for plugins or child themes to add their own template files and infinitely less flexible since they are forcing the same base wrapping on every template file. The theme should use header.php and footer.php instead of a template redirect to include that. This is what WordPress requires for standards purposes. Here’s more information about this:

I was able to alter the theme’s template include hijack by adding this code to your child theme.

function ph_remove_theme_template_redirect($single_template) {
global $post;

if ($post->post_type == ‘ph-project’) {
remove_filter(‘template_include’, array(‘Kadence_Wrapping’, ‘wrap’), 101);
}
return $single_template;
}
add_filter( ‘single_template’, ‘ph_remove_theme_template_redirect’ );

This removes the template_include filter applied by the theme on Projecthuddle pages. You’ll need to keep that code in your child theme until the theme author applies WordPress coding standards to the theme, or you switch to a theme that applies WordPress standards.

Let me know if you need any additional assistance!

Andre Gagnon
[email protected]

  • The forum ‘Virtue Theme’ is closed to new topics and replies.