• Resolved stelaras1

    (@stelaras1)


    Hi guys,

    i ‘d like to automatically change some characters (or character) with specific letters within the post title.
    For instance a -> A
    b -> bi

    do you have an idea how i could achive this?

    Thanks,
    Stelios

Viewing 2 replies - 1 through 2 (of 2 total)
  • Add to your functions.php:

    add_filter( ‘the_title’, ‘my_the_title’ );

    function my_the_title( $title ) {
    $title = str_replace( ‘a’, ‘A’, $title );
    $title = str_replace( ‘b’, ‘bi’, $title );

    return $title;
    }

    Thread Starter stelaras1

    (@stelaras1)

    woww
    thanks a mil!
    it’s working great ??

    could i apply the same also to the content?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘replace specific letters in post title’ is closed to new replies.