Skip to content

Instantly share code, notes, and snippets.

@mgibbs189
Last active March 23, 2020 17:32
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mgibbs189/0f4426be26dd3fb3123e505c2b80faa3 to your computer and use it in GitHub Desktop.
Save mgibbs189/0f4426be26dd3fb3123e505c2b80faa3 to your computer and use it in GitHub Desktop.
FacetWP - force-remove the fwp-loop HTML comment tag
<?php
add_action( 'init', function() {
remove_action( 'loop_start', [ FWP()->display, 'add_template_tag' ] );
remove_action( 'loop_no_results', [ FWP()->display, 'add_template_tag' ] );
}, 20 );
@remcokalf
Copy link

remcokalf commented Mar 23, 2020

This should be added too:

remove_action( 'loop_no_results', [ FWP()->display, 'add_template_tag' ] );

This html comment caused me trouble because :empty javascript was not working.

@mgibbs189
Copy link
Author

Updated, thanks @remcokalf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment