• Is there a way to disable the plugin based on the template used in a post? I’m aware of excluding by post type, but I need a method to deactivate the plugin when specific templates are in use.

Viewing 1 replies (of 1 total)
  • Plugin Author Sybre Waaijer

    (@cybr)

    Howdy!

    This is possible using a combination of filters (the_seo_framework_query_supports_seo) and the is_page_template() function.

    For example, if we want to exclude “my-example-template.php” from being affected by The SEO Framework, then this filter should work:

    add_filter(
    	'the_seo_framework_query_supports_seo',
    	fn( $supported ) => is_page_template( 'my-example-template.php' ) ? false : $supported,
    );

    To implement this filter, you should change my-example-template.php to your template file’s name.

    (Where do I place filters?)

Viewing 1 replies (of 1 total)
  • The topic ‘Disable Output of Plugin based on Template’ is closed to new replies.