|
/ Documentation /Developers Documentation/ Customize Final Title Tag surerank_final_title

Customize Final Title Tag surerank_final_title

Hook: surerank_final_title

Description: The surerank_final_title filter allows you to modify the final SEO title that SureRank outputs on the frontend for posts, pages, or custom post types. This is useful when you need to override the default title dynamically—based on custom logic, conditions, or personalization—before it appears in the HTML <title> tag or meta output.

Source: inc/frontend/title.php

Usage: Use this filter to change or customize the title for SEO purposes right before it’s rendered on the page.

Example:

PHP
add_filter( 'surerank_final_title', 'custom_title' );

function custom_title( $title ) {
    return 'My Title';
}

You can add the example code to your child theme’s functions.php file or use a plugin like Code Snippets to safely insert custom code. Using a code snippet plugin is recommended for easier management and to ensure the code remains active even if you switch themes.

Was this doc helpful?
What went wrong?

We don't respond to the article feedback, we use it to improve our support content.

Need help? Contact Support
On this page
Scroll to Top