diff --git a/wp-content/themes/pub/wporg-learn-2024/functions.php b/wp-content/themes/pub/wporg-learn-2024/functions.php index c5795d86f..e0a7bdca0 100644 --- a/wp-content/themes/pub/wporg-learn-2024/functions.php +++ b/wp-content/themes/pub/wporg-learn-2024/functions.php @@ -17,6 +17,7 @@ require_once __DIR__ . '/inc/block-config.php'; require_once __DIR__ . '/inc/block-hooks.php'; require_once __DIR__ . '/inc/query.php'; +require_once __DIR__ . '/inc/head.php'; /** * Actions and filters. diff --git a/wp-content/themes/pub/wporg-learn-2024/inc/head.php b/wp-content/themes/pub/wporg-learn-2024/inc/head.php new file mode 100644 index 000000000..cafe77d7a --- /dev/null +++ b/wp-content/themes/pub/wporg-learn-2024/inc/head.php @@ -0,0 +1,59 @@ +labels->singular_name; + } + } + + // If results are paged and the max number of pages is known. + if ( is_paged() && $wp_query->max_num_pages ) { + $parts['page'] = sprintf( + // translators: 1: current page number, 2: total number of pages + __( 'Page %1$s of %2$s', 'wporg-learn' ), + get_query_var( 'paged' ), + $wp_query->max_num_pages + ); + } + + return $parts; +} + +/** + * Customizes the document title separator. + * + * @param string $separator Current document title separator. + * @return string + */ +function document_title_separator( $separator ) { + return '|'; +}