After some reading and thinking I sorted it out.
I share this piece of code, just in case it is useful to somebody else.
// Disable WP External Links for certain CPT's
if ( ! function_exists( 'wpel_init' ) ) { // in case wpel is not enabled
return;
} else {
add_action( 'wpel_apply_settings', 'my_disable_wpel', 10 );
function my_disable_wpel() {
$ignored_cpts = array ( 'cpt1', 'cpt2' );
if ( in_array( get_post_type(), $ignored_cpts ) && is_single() ) {
return false;
}
return true;
}
}
// END Disable WP External Links for certain CPT's
Thanks
@caban13 really sounds a great feature. Already put it at our to-do list in order to analysed and probably included in the coming updates.
If you have a minute, please leave a review. It’s what keeps support going. Thank you 🙏 https://ww.wp.xz.cn/support/plugin/open-external-links-in-a-new-window/reviews/#new-post
@manuelrocha88 you have 2 plugins for the same function ?
this is weird, can you explain why ?
@caban13 that was an error in pasting 🙂 link should have been for WPEL 😀
Why we have 2 – we made one, the other wasn’t maintained so we took over. Preliminary efforts to merge failed because people got pissed that we are “forcing them to use something else”. So here we are with 2 … not ideal, we know.