|
/ Documentation /Developers Documentation/ Customize Homepage Pagination Format surerank_homepage_pagination_format

Customize Homepage Pagination Format surerank_homepage_pagination_format

Hook: surerank_homepage_pagination_format

Description: This filter allows developers to customize the pagination format used on the homepage. By default, SureRank outputs a pagination string such as “Page 1”, “Page 2”, etc. Using this filter, you can modify the format to suit your design or SEO preferences.

Source: inc/functions/helper.php

Usage: You can use this hook to change the default pagination label to a custom format. For example, display it as Pg. 1 instead of Page 1, or translate it to another language.

Example:

PHP
// Customize the pagination format on the homepage to display as "Page X"
add_filter( 'surerank_homepage_pagination_format', 'custom_homepage_pagination_format' );

function custom_homepage_pagination_format() {
    return 'Page %s';
}

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