Hello again!
This may help, instead. You can extend the $pages_to_exclude
array indefinitely with any problematic endpoint:
add_action( 'parse_request', function( $wp ) {
// Add any page you wish to exlude here on a new line; use * as a wildcard.
$pages_to_exclude = [
'buy-points',
'profile/*',
];
if ( ! is_admin() && isset( $wp->request ) ) {
if ( preg_match( '#^' . str_replace( '*', '.*?', implode( '|', $pages_to_exclude ) ) . '$#i', $wp->request ) ) {
add_filter( 'the_seo_framework_post_type_disabled', '__return_true' );
}
}
} );
Please keep in mind that the plugin causing all these issues built a layer most unrecognizable on top of WordPress, and it filters everything attached (on the wrong endpoints…) to fix its mess. It’s quite egregious on how common this is. Plugins that appear on www.remarpro.com that do this are often marked with a dozen or more one-star ratings–don’t ask me which ??
In any case, you may be better off excluding the post type all-together–if it’s assigned as one in the first place. You may find an option for it under “SEO Settings -> General -> Post Types”, which saves you the hassle of maintaining code. It’s probably marked as wpqa
.
As for the “relative URL” plugin, I don’t know which it is. It’s probably one which promises to fix all “mixed content” issues; or, otherwise, it may be a toggle hidden somewhere in an optimization plugin.