Hello,
Thank you for contacting Rank Math today.
You can modify your code to the following to add the title tag:
add_action( 'template_redirect', 'rankmath_disable_features' );
function rankmath_disable_features() {
if( is_page( '800' ) ) {
remove_all_actions( 'rank_math/head' );
add_action( 'rank_math/head', '_wp_render_title_tag', 1 );
}
}
Looking forward to helping you. Thank you.
​​​​​​
Yeah, it’s working but still, I’m not able to overwrite title dynamically.
Hi there,
Thanks for getting back to us.
You should be able to change the title from the Rank Math metabox on the back end or your can use the following filter to dynamically change the title:
/**
* Filter to change the page title.
*
* @param string $title
*/
add_filter( 'rank_math/frontend/title', function( $title ) {
return $title;
});
I hope this info helps. Thank you.
No, but still title comes via rank math
<!-- Search Engine Optimization by Rank Math - https://s.rankmath.com/home -->
<title>demo - title</title>
<!-- /Rank Math WordPress SEO plugin -->
and because of that my overwriter rule not working properly, I create the function
add_filter('wpseo_title', 'filter_product_wpseo_title');
function filter_product_wpseo_title($title) {
if ( is_page(800)) {
add_action( 'wpseo_title', __CLASS__ .'::generate_meta_tags', 15, 1 );
}
return $title;
}
which is properly working with Yoast but with rank math title was still not overwriter because of its come via plugin.
Hello,
We might need to take a closer look at the settings. Please edit the first post on this ticket and include your WP logins in the designated Sensitive Data section.
It is completely secure and only our support staff has access to that section. If you want, you can use the below plugin to generate a temporary login URL to your website and share that with us instead:
https://wordpress.org/plugins/temporary-login-without-password/
You can use the above plugin in conjunction with the WP Security Audit Log to monitor what changes our staff might make on your website (if any):
https://wordpress.org/plugins/wp-security-audit-log/
We really look forward to helping you.
Hello,
Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.
If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.
Thank you.