Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Modifying page title using the_title filter in WordPress
<?php
add_filter( 'the_title', 'nine11day_modify_post_title' );
function nine11day_modify_post_title( $title ) {
if ( is_page() && in_the_loop() && $title == 'Existing Title' )
$title = '<span>Existing</span> Title';
return $title;
}
@Nuriman2

This comment has been minimized.

Copy link

@Nuriman2 Nuriman2 commented May 22, 2019

vvvvv

@madurapa

This comment has been minimized.

Copy link

@madurapa madurapa commented Jul 3, 2020

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.