简体   繁体   English

XML解析错误: <unknown> :26:41:标签不匹配

[英]XML parsing error: <unknown>:26:41: mismatched tag

this is a wordpress installation. 这是一个WordPress安装。 I have tried everything I can think of. 我已经尝试了所有我能想到的。 It says the code is malformed. 它说代码格式不正确。 I even tried adding the tag to the feed-rss2.php 我什至尝试将标签添加到feed-rss2.php

For some reason no matter what changes I make it does not matter. 由于某种原因,无论我进行什么更改都没有关系。 i know this is the right file because if I delete things the site gets weird 我知道这是正确的文件,因为如果我删除内容,该网站会变得很奇怪

here is the raw code in the area where the validator says its not correct 这是验证者说不正确的区域中的原始代码

<dc:creator><![CDATA[<?php the_author() ?></dc:creator>
    <![CDATA[<?php the_category_rss() ?>

You can clearly see right here that the category is not being opened and closed 您可以在此处清楚地看到该类别没有被打开和关闭

here is the link to the validation of that php 这是该PHP验证的链接

Feed Validator 提要验证器

I'm not sure where you're defining this data...but you need to close your brackets: 我不确定您在哪里定义此数据...但是您需要将方括号括起来:

<dc:creator><![CDATA[<?php the_author(); ?>]]></dc:creator>
                                           ^^^

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM