• Hello everyone – I am experiencing problems with capitalization at my post headlines. I’ve found the code to correct the problem (below) but have no idea where to insert it. Where should I add this code?

    function toUpperCase($input){
    return strtoupper(strtr($input,’?ü??i??’, ‘?ü?I???’) );
    }

    function toLowerCase($input){
    return strtolower(strtr($input,’?ü?I???’,’?ü??i??’));
    }

    // also uppercase
    function toUpper($text) {
    return mb_strtoupper(str_replace(‘i’, ‘?’, $text), “UTF-8”);
    }

Viewing 2 replies - 1 through 2 (of 2 total)
  • What do you mean by headlines?

    Do you mean the title, if so you can use CSS Text Transform

    Examaples:
    This Is Capitalized Text Transform

    .singular .entry-title {
        text-transform: capitalize;
    }

    THIS IS UPPERCASE TEXT TRANSFORM

    .singular .entry-title {
        text-transform: uppercase;
    }

    HTH

    David

    Thread Starter bahcevan

    (@bahcevan)

    Hello – No, I already have my post headlines transformed into capital letters. My problem is when there is an “i” in the post title, it is capitalized as “I”, but I want it capitalized as “?” (Turkish). The above code does that but I dont know where to enter it. I tried the functions.php in my theme file but didnt work.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Where to add code for String Capitalization Functions’ is closed to new replies.