Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I've having trouble with accented characters now if i do utf8_decode() before echoing the title the problem is solved but instead of changing this all over my theme, can't I do this in one place that upgrade proof? I'm not really familiar with hooks but I think thats they way to do it, havent found out how to do it tho.

share|improve this question
3  
You should rather find out why UTF-8 does not work. That is the default encoding, and it should not be changed. –  toscho Dec 11 '12 at 9:02
    
Yea true but think is info comes from feed and the accented chars are not correctly in there its there uncoded, which means it gets loaded in uncoded so either I change the importer to decode before storing or i change the enchoing, decoding probly better. Which I just did –  Bram Dec 12 '12 at 1:07

1 Answer 1

up vote 1 down vote accepted

The filter for the_title functions is this one:

add_filter( 'the_title', 'f711_title_filter' );

function f711_title_filter( $title ) {

    return utf8_decode( $title );

}
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.