How to fix RSS Feed parsing error in Wordpress

From last night, whenever I tried to access the feed url of my Wordpress blog, I saw this error:

This page contains the following errors:

error on line 12 at column 49: Entity 'ndash' not defined

Below is a rendering of the page up to the first error.


So, here is how I fixed it:

1. First, go to the online feed validator tool to see what was wrong:

http://feedvalidator.org/

Enter my blog feed url and see the result. It turned out that there is something wrong with the feed title tag. It includes a strange character called –

2. Go to the template's include folder, open the template file which defines the feed's title and remove that character. I'm using genbu theme, so I will edit genbu/includes/tamatebako.php, the  tamatebako_wp_title function as following line:

...
        /* Add Site Description */
        if( is_front_page() ){
                if ( $site_description ){
                        $doctitle = "{$doctitle} {$site_description}";
                }
        }
        /* Add Site Title */
        else{
                $doctitle = "{$doctitle} {$site_title}";
        }

        /* If the current page is a paged. */
        if ( ( ( $page = get_query_var( 'paged' ) ) || ( $page = get_query_var( 'page' ) ) ) && $page > 1 ){
                $page = number_format_i18n( absint( $page ) );
                $doctitle = sprintf( tamatebako_string( 'paged' ), $doctitle . " ", $page );
        }
...



It's OK now! \m/

Comments