Home Backend Development PHP Tutorial Fix WordPress feed display errors with the Fix Rss Feeds plugin

Fix WordPress feed display errors with the Fix Rss Feeds plugin

Jul 29, 2016 am 09:09 AM
error feed php the wordpress

Today, suddenly a netizen left a message saying that the blog's feed was down. The symptoms are as follows:

Open the subscription page directly in Chrome and the display is as follows:

This page contains the following errors:

error on line 1 at column 1: Document is empty

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

Copy after login

FeedDemon Tip: This feed contains errors.

There is no impact after adding it and it can be used normally.

Xianguo Reader can also be read, but the latest articles are not available.

I tried it with IE and it showed "Invalid content exists at the top level of the document."

Looking at the source code, I found that I can see the content after parsing the HTML format. This shows that there is no problem with the WordPress feed output. The problem lies in a certain file format. But it is more difficult to find which file is the problem. The solutions given on the Internet are roughly as follows:

Check whether there are extra carriage returns and line feeds at the top and bottom

1. Check the wp-config.php file and check whether there are carriage returns in the code outside the PHP body. symbol;

2. Same as above, detect the wp-rss2.php and wp-atom.php files. If they have not been modified recently, you can skip them;

3. Same as above, detect the functions.php file;

4. Pay attention to the feed It is cached. After the modification is completed, post an article and let the WP program rebuild the feed to see the effect;

5. If there are still errors, you can try to temporarily close all plug-ins, change the theme, etc. to eliminate them one by one.

I have modified all the above files, but still have no clue. . So I installed a plug-in "Fix Rss Feeds", enabled it and fixed it. And after the repair, deleting the plug-in will not cause the rebound~

After researching this plug-in, it seems that it only modified wp-blog-header.php in the WordPress root directory. In fact, you only need to change this file to:

<&#63;php
/**
 * Loads the WordPress environment and template.
 *
 * @package WordPress
 */

if ( !isset($wp_did_header) ) {
 $wp_did_header = true;
  ob_start(); //2010-09-18 gofunnow.com added, it will Fix rss feed error "Error on line 2: The processing instruction target matching "[xX][mM][lL]" is not allowed." while burn feed from feedburner.com
 <strong>require</strong>_once( dirname(__FILE__) . '/wp-load.php' );
  ob_end_clean(); //2010-09-18 gofunnow.com added, it will Fix rss feed error "Error on line 2: The processing instruction target matching "[xX][mM][lL]" is not allowed." while burn feed from feedburner.com
 wp();
 <strong>require</strong>_once( ABSPATH . WPINC . '/template-loader.php' );
}
&#63;>​

Copy after login

That’s it.

The above introduces how to use the Fix Rss Feeds plug-in to fix WordPress feed display errors, including the require content. I hope it will be helpful to friends who are interested in PHP tutorials.

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Hot Topics

Java Tutorial
1662
14
PHP Tutorial
1262
29
C# Tutorial
1235
24
How to adjust the wordpress article list How to adjust the wordpress article list Apr 20, 2025 am 10:48 AM

There are four ways to adjust the WordPress article list: use theme options, use plugins (such as Post Types Order, WP Post List, Boxy Stuff), use code (add settings in the functions.php file), or modify the WordPress database directly.

How to build a website for wordpress host How to build a website for wordpress host Apr 20, 2025 am 11:12 AM

To build a website using WordPress hosting, you need to: select a reliable hosting provider. Buy a domain name. Set up a WordPress hosting account. Select a topic. Add pages and articles. Install the plug-in. Customize your website. Publish your website.

How to change the head image of the wordpress theme How to change the head image of the wordpress theme Apr 20, 2025 am 10:00 AM

A step-by-step guide to replacing a header image of WordPress: Log in to the WordPress dashboard and navigate to Appearance &gt;Theme. Select the topic you want to edit and click Customize. Open the Theme Options panel and look for the Site Header or Header Image options. Click the Select Image button and upload a new head image. Crop the image and click Save and Crop. Click the Save and Publish button to update the changes.

The Compatibility of IIS and PHP: A Deep Dive The Compatibility of IIS and PHP: A Deep Dive Apr 22, 2025 am 12:01 AM

IIS and PHP are compatible and are implemented through FastCGI. 1.IIS forwards the .php file request to the FastCGI module through the configuration file. 2. The FastCGI module starts the PHP process to process requests to improve performance and stability. 3. In actual applications, you need to pay attention to configuration details, error debugging and performance optimization.

How to cancel the editing date of wordpress How to cancel the editing date of wordpress Apr 20, 2025 am 10:54 AM

WordPress editing dates can be canceled in three ways: 1. Install the Enable Post Date Disable plug-in; 2. Add code in the functions.php file; 3. Manually edit the post_modified column in the wp_posts table.

How to view the front-end of WordPress How to view the front-end of WordPress Apr 20, 2025 am 10:30 AM

You can view the WordPress front-end by logging into the dashboard and switching to the View Sites tab; automate the viewing process with a headless browser; installing the WordPress plugin to preview the front-end within the dashboard; viewing the front-end via a local URL (if WordPress is set locally).

How to write a header of a wordpress How to write a header of a wordpress Apr 20, 2025 pm 12:09 PM

The steps to create a custom header in WordPress are as follows: Edit the theme file "header.php". Add your website name and description. Create a navigation menu. Add a search bar. Save changes and view your custom header.

How to import the source code of wordpress How to import the source code of wordpress Apr 20, 2025 am 11:24 AM

Importing WordPress source code requires the following steps: Create a sub-theme for theme modification. Import the source code and overwrite the files in the sub-topic. Activate the sub-theme to make it effective. Test the changes to make sure everything works.

See all articles