RSS Problem
-
I’m getting similar errors with both Entries RSS and Comments RSS in my blog at https://www.markblackshear.com/wordpress
ENTRIES
This page contains the following errors:
error on line 2 at column 31: XML declaration allowed only at the start of the document
Below is a rendering of the page up to the first error.COMMENTS
This page contains the following errors:
error on line 2 at column 31: XML declaration allowed only at the start of the document
Below is a rendering of the page up to the first error.Does anyone know what’s going on and how to fix it?
-
Get rid of the line:
<meta http-equiv="content-type" content="text/html;charset=utf-8">
at the very top of header.php.
Thanks, esmi, but that line doesn’t appear at the top of my header.php file. I’d appreciate any further help you can give me.
Here is the present code at
https://www.markblackshear.com/wordpress/wp-content/themes/blackshear/header.php<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="https://www.w3.org/1999/xhtml" <?php if(function_exists('language_attributes')) { language_attributes(); }else{ echo "<h1>Oops:</h1><font color=\"red\">This theme only works with WordPress 2.1.* or higher. You seem to have an <b>outdated version</b> of wordpress. Please download the latest <a href=\"https://www.wordpress.com\">WordPress</a> to use this theme and also get the latest security patches.</font>"; // exit(); } ?>> <head profile="https://gmpg.org/xfn/11"> <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" /> <title><?php bloginfo('name'); ?> <?php if ( is_single() ) { ?> » Blog Archive <?php } ?> <?php wp_title(); ?></title> <meta name="generator" content="WordPress <?php bloginfo('version'); ?>" /> <link href="https://www.markblackshear.com/css/blackshear.css" rel="stylesheet" media="all"> <link rel="stylesheet" type="text/css" href="<? bloginfo('stylesheet_directory') ?>/reset-fonts-grids-tabs.css" /> <link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" /> <link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> RSS Feed" href="<?php bloginfo('rss2_url'); ?>" /> <link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" /> <?php wp_head(); ?> <meta name="description" content="From a Photographer's Blind is a journal in pictures and words by Mark Blackshear."> <script type="text/javascript" src="https://www.markblackshear.com/GeneratedItems/CSScriptLib.js"></script> <meta name="keywords" content="Mark Blackshear, Mark Lee Blackshear, Marky Lee, Mark Blackshear Photography, photographer, photography, professional photography, portrait photographers, Brooklyn portrait photographers, New York portrait photographers, Black portrait photographers, photos, author photos, Black photographer, African American photographer, New York photographer, Brooklyn photographer, music photography, fine art photography, Brooklyn wedding photographer, wedding photography, New York acting portfolios, New York modeling portfolios, floral photography, dance photography, Kamoinge"> <link href="https://www.markblackshear.com/favicon.ico" rel="shortcut icon"> <style type="text/css" media="screen"><!-- body { margin: 0; } --></style> <script type="text/javascript"><!-- CSInit[CSInit.length] = new Array(initLightbox); CSInit[CSInit.length] = new Array(CSIEPNGFix); var preloadFlag = false; function preloadImages() { if (document.images) { pre_home_ov = newImage('https://www.markblackshear.com/navigation/home_ov.gif'); pre_about_ov = newImage('https://www.markblackshear.com/navigation/about_ov.gif'); pre_statement_ov = newImage('https://www.markblackshear.com/navigation/statement_ov.gif'); pre_clients_ov = newImage('https://www.markblackshear.com/navigation/clients_ov.gif'); pre_publications_ov = newImage('https://www.markblackshear.com/navigation/publications_ov.gif'); pre_galleries2_ov = newImage('https://www.markblackshear.com/navigation/galleries2_ov.gif'); pre_journal_ov = newImage('https://www.markblackshear.com/navigation/journal_ov.gif'); pre_connect_ov = newImage('https://www.markblackshear.com/navigation/connect_ov.gif'); pre_list_ov = newImage('https://www.markblackshear.com/navigation/list_ov.gif'); preloadFlag = true; } } // --></script> </head> <body onload="CSScriptInit();preloadImages();"> <div id="doc" class="yui-t1"> <div id="hd"> <h1><a href="<?php echo get_option('home'); ?>"><img src="https://markblackshear.com/navigation/mark-blackshear2.gif" alt="<?php bloginfo('name'); ?>"></a></h1> </div> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr height="18"> <td class="border_yellow_bottom" align="center" valign="bottom" width="797" height="18"> <table border="0" cellspacing="0" cellpadding="0"> <tr> <td><a onmouseover="changeImages('home','https://www.markblackshear.com/navigation/home_ov.gif');return true;" onmouseout="changeImages('home','https://www.markblackshear.com/navigation/home.gif');return true" href="https://www.markblackshear.com/index.html"><img id="home" src="https://www.markblackshear.com/navigation/home.gif" alt="Home" name="home" height="18" width="47" border="0"></a></td> <td width="7"><img src="https://www.markblackshear.com/navigation/spacer.gif" alt="" height="7" width="7" border="0"></td> <td><a onmouseover="changeImages('about','https://www.markblackshear.com/navigation/about_ov.gif');return true;" onmouseout="changeImages('about','https://www.markblackshear.com/navigation/about.gif');return true" href="https://www.markblackshear.com/about.html"><img id="about" src="https://www.markblackshear.com/navigation/about.gif" alt="About" name="about" height="18" width="55" border="0"></a></td> <td width="7"><img src="https://www.markblackshear.com/navigation/spacer.gif" alt="" height="7" width="7" border="0"></td> <td><a onmouseover="changeImages('statement','https://www.markblackshear.com/navigation/statement_ov.gif');return true;" onmouseout="changeImages('statement','https://www.markblackshear.com/navigation/statement.gif');return true" href="https://www.markblackshear.com/statement.html"><img id="statement" src="https://www.markblackshear.com/navigation/statement.gif" alt="Statement" name="statement" height="18" width="83" border="0"></a></td> <td width="7"><img src="https://www.markblackshear.com/navigation/spacer.gif" alt="" height="7" width="7" border="0"></td> <td><a onmouseover="changeImages('clients','https://www.markblackshear.com/navigation/clients_ov.gif');return true;" onmouseout="changeImages('clients','https://www.markblackshear.com/navigation/clients.gif');return true" href="https://www.markblackshear.com/clients.html"><img id="clients" src="https://www.markblackshear.com/navigation/clients.gif" alt="Clients & Exhibitions" name="clients" height="18" width="154" border="0"></a></td> <td width="7"><img src="https://www.markblackshear.com/navigation/spacer.gif" alt="" height="7" width="7" border="0"></td> <td><a onmouseover="changeImages('galleries2','https://www.markblackshear.com/navigation/publications_ov.gif');return true;" onmouseout="changeImages('galleries2','https://www.markblackshear.com/navigation/publications.gif');return true" href="https://www.markblackshear.com/publications.html"><img id="galleries2" src="https://www.markblackshear.com/navigation/publications.gif" alt="Publications" name="galleries2" height="18" width="100" border="0"></a></td> <td width="7"><img src="https://www.markblackshear.com/navigation/spacer.gif" alt="" height="7" width="7" border="0"></td> <td><a onmouseover="changeImages('galleries','https://www.markblackshear.com/navigation/galleries2_ov.gif');return true;" onmouseout="changeImages('galleries','https://www.markblackshear.com/navigation/galleries2.gif');return true" href="https://www.markblackshear.com/events-gallery.html"><img id="galleries" src="https://www.markblackshear.com/navigation/galleries2.gif" alt="Galleries" name="galleries" height="18" width="73" border="0"></a></td> <td width="7"><img src="https://www.markblackshear.com/navigation/spacer.gif" alt="" height="7" width="7" border="0"></td> <td><a onmouseover="changeImages('journal','https://www.markblackshear.com/navigation/journal_ov.gif');return true;" onmouseout="changeImages('journal','https://www.markblackshear.com/navigation/journal_at.gif');return true" href="https://www.markblackshear.com//wordpress"><img id="journal" src="https://www.markblackshear.com/navigation/journal_at.gif" alt="Journal" name="journal" height="18" width="66" border="0"></a></td> <td width="7"><img src="https://www.markblackshear.com/navigation/spacer.gif" alt="" height="7" width="7" border="0"></td> <td><a onmouseover="changeImages('contact','https://www.markblackshear.com/navigation/connect_ov.gif');return true;" onmouseout="changeImages('contact','https://www.markblackshear.com/navigation/connect.gif');return true" href="https://www.markblackshear.com/connect.html"><img id="contact" src="https://www.markblackshear.com/navigation/connect.gif" alt="Contact" name="contact" height="18" width="71" border="0"></a></td> <td width="7"><img src="https://www.markblackshear.com/navigation/spacer.gif" alt="" height="7" width="7" border="0"></td> <td><a onmouseover="changeImages('mail2','https://www.markblackshear.com/navigation/list_ov.gif');return true;" onmouseout="changeImages('mail2','https://www.markblackshear.com/navigation/list.gif');return true" href="https://list-manage.com/subscribe.phtml?id=f124418248"><img id="mail2" src="https://www.markblackshear.com/navigation/list.gif" alt="Mailing List" name="mail2" height="18" width="92" border="0"></a></td> </tr> </table> </td> </tr> </table> <p></p> </body> </html>
Are you using an SEO plugin or something because the line that Esmi shows is definitely generated in the page’s sourcecode as a meta content-type tag.
Thanks, I finally located this line of code:
<meta http-equiv="content-type" content="text/html;charset=utf-8">
at the top of wp-config.php, The RSS feeds work properly now. Thanks for your help!
- The topic ‘RSS Problem’ is closed to new replies.