Pro - Woo Conflict wit Pro Header Special code

Hello I was told someone could give me some custom code to fix the conflict which prevents me form adding a header to a Post. I have over 6,000 items in my store.
Deactivating Woo is not an option.


Themeco Hi Kevin, We’ve checked in on this and there’s a limitation where it’s not supplying posts beyond the first 2500 items. It looks like the products are filling that up and you’re unable to see the posts. If you have a staging environment that you work with, one workaround would be if you disabled WooCommerce temporarily. This would prevent the products from appearing in that list. I’ve checked with one of our lead developers and if you open a support ticket there is some custom code we can apply on your site that would disable products from appearing.

Hi There,

Please follow up the steps below:

  1. Ensure everything is up to date according to our version compatibility list here. Please follow the best practices when updating your theme and plugins. Click here for more information.

  2. Go to X > Settings and click on the Clear Style Cache button.

  3. If you’re using a CDN(ex: CloudFlare), please clear the CDN’s cache and disable optimization services. For the CloudFlare you also need to follow the steps below besides the developer mode:

  4. I could see that you has 46 active plugins, try testing for a plugin conflict. You can do this by deactivating all third-party plugins, and see if the problem remains. If it’s fixed, you’ll know a plugin caused the problem, and you can narrow down which one by reactivating them one at a time.

  5. Remove custom CSS and Javascript from the options or Child Theme and test the case.

  6. Reset your htaccess file by renaming it to .htaccess-bak. Then in WP Admin Menu, go to Settings > Permalinks and just click the Save Changes button.

  7. Increase the PHP Memory Limit of your server. Click here for more detailed information and how to increase the PHP memory limit.

If you still have problems. Would you mind create a staging version of your website so we can take a closer look?

Let us know how it goes!

Hey @mackeykevin,

Sorry for the confusion. The previous response by @thai are unlikely to solve your issue. I have posted this in our issue tracker so our lead developer could provide the code to disable the product post type in the Header Builder Assignment. We will update this thread. Please stay tuned.

Thank you.

1 Like

Hi @mackeykevin

No problem! Here’s the code you will need to disable WooCommerce products from appearing in the assignment list.

function header_footer_assignment_filter( $types ) {
  return array_diff( $types, array( 'product' ) );

add_filter('cs_header_assignment_post_types', 'header_footer_assignment_filter');
add_filter('cs_footer_assignment_post_types', 'header_footer_assignment_filter');

You can add this code to functions.php of a child theme or in a custom plugin. Please update to Pro 2.1.5 beforehand as we just added this filter in the recent point release.

1 Like

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