This same error caused an issue with the The Event Calendar when trying to restrict it’s archive and post types:
2023-9-27 13:58:54 – ERROR: Rule content_is_tribe_events_archive
has no callback.
2023-9-27 13:58:54 – ERROR: Rule content_is_tribe_events
has no callback.
Dispite being on 2.0.9, adding this to the child theme’s functions.php file did not solve the issue:
add_filter( 'content_control/query_filter_init_hook', function () {
return 'init'; // Try setup_theme, after_theme_setup, init or wp_loaded
} );
However, this did:
remove_filter( 'the_posts', [ \ContentControl\plugin('Frontend\Restrictions\QueryPosts'), 'restrict_query_posts' ], 10, 2 );
add_action( 'init', function () {
add_filter( 'the_posts', [ \ContentControl\plugin('Frontend\Restrictions\QueryPosts'), 'restrict_query_posts' ], 10, 2 );
} );