• Resolved Johan F00

    (@justrunlah)


    Hi, very nice plugin.
    My theme takes care of modal pop ups for images in single posts so I don’t want WP Featherlight be loading there. Instead, I want to load it for custom post types.

    I tried

    function remove_featherlight_at_singles() {
        if (is_single() ) {
            add_filter( 'wp_featherlight_load_css', '__return_false' );
            add_filter( 'wp_featherlight_enable_packed_js', '__return_false' );
        }
    }
    add_action('wp_head', 'remove_featherlight_at_singles');

    but it didn’t work. The result is on single posts I get 2 modal windows (one from WPFL and one from the theme).

    Is there a way to either disable loading on single posts, or load it only at specific CPTs?

    thanks

    https://www.ads-software.com/plugins/wp-featherlight/

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Only load in specific custom post types’ is closed to new replies.