|
/ Documentation /Developers Documentation/ Customize Archive Page Title with surerank_archive_title

Customize Archive Page Title with surerank_archive_title

Hook: surerank_archive_title

Description: The surerank_archive_title filter changes the HTML document title for applicable archive requests. It does not edit the theme’s visible archive heading. This can be useful when you want to personalize or brand archive titles instead of using the default ones provided by WordPress or the plugin.

Source: inc/frontend/title.php

Usage: This filter runs on archive pages only when automatic titles are enabled and surerank_enable_archive_auto_title returns true. The fixed example below changes every matching archive title; add a conditional if it should apply only to a specific archive.

Example:

PHP
add_filter( 'surerank_archive_title', function( $title ) {
    return 'Blog Archive';
});

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
Table of Contents
Scroll to Top