Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Miguel Sirvent

    (@poxtron)

    Hi.

    The embeds are added using the wp_embed_register_handler() function so in theory you should be able to use wp_embed_unregister_handler() on an action.

    I have not tested this but it should work

    function wef_conditional() {
      if(in_category(12)){
        wp_embed_unregister_handler('wpembedfb');
      }
    }
    
    add_action( 'wp', 'wef_conditional' );

    Let me know if this works for you.

    Thread Starter Celso Bessa

    (@celsobessa)

    I will give a try and update the post with the results. Thanks for the response!

    Thread Starter Celso Bessa

    (@celsobessa)

    updating. It didn’t worked.

    I tried other hooks as well, but still not working. Don’t know if is something on my environment or if doing something wrong, but I will update if I have some news.

    Thanks anyway

    Plugin Author Miguel Sirvent

    (@poxtron)

    It worked for me on the frontend.

    Did you purged cache?

    Thread Starter Celso Bessa

    (@celsobessa)

    Yep. I guess is something on my stack. I will check later again!

    Thanks agaain, Miguel!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Conditional Loading’ is closed to new replies.