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.
I will give a try and update the post with the results. Thanks for the response!
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
It worked for me on the frontend.
Did you purged cache?
Yep. I guess is something on my stack. I will check later again!
Thanks agaain, Miguel!