Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions web/app/themes/juniper-theme/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,16 @@ function juniper_editor_styles() {
add_editor_style( '/dist/src/css/_app.css' );
}

/**
* This fixes the duplicate title issue with Rank Math and Yoast SEO.
*/
add_action( 'wp_head', 'juniper_fix_rankmath_duplicate_title', 0 );
function juniper_fix_rankmath_duplicate_title(): void {
if ( defined( 'RANK_MATH_VERSION' ) || defined( 'WPSEO_VERSION' ) ) {
remove_action( 'wp_head', '_block_template_render_title_tag', 1 );
}
}

/**
* This ensures that Timber is loaded and available as a PHP class.
* If not, it gives an error message to help direct developers on where to activate
Expand Down