admin管理员组文章数量:1431721
I've got the following code in my "pagetitle" template partial:
<?php
the_archive_title( '<h1>', '</h1>' );
the_archive_description( '<span class="archive-description">', '</span>' );
?>
Now, what I expect to see in my page is this:
<h1>The Archive title</h1>
<span class="archive-description">The Archive description</span>
But instead I've got this:
<h1>Archive title <span class="archive-description">The Archive description</span></h1>
The description span enclosed inside the title h1. Why is that?
Note: I've previously removed the p tag from the_archive_description()
using remove_filter('term_description','wpautop');
I've got the following code in my "pagetitle" template partial:
<?php
the_archive_title( '<h1>', '</h1>' );
the_archive_description( '<span class="archive-description">', '</span>' );
?>
Now, what I expect to see in my page is this:
<h1>The Archive title</h1>
<span class="archive-description">The Archive description</span>
But instead I've got this:
<h1>Archive title <span class="archive-description">The Archive description</span></h1>
The description span enclosed inside the title h1. Why is that?
Note: I've previously removed the p tag from the_archive_description()
using remove_filter('term_description','wpautop');
1 Answer
Reset to default 1I've solved using the solution posted by @Quinn Commendant in the following thread: https://wordpress.stackexchange/a/203884/160016
In any case, the above behaviour is weird...
本文标签: functionsHow to display thearchivetitle() and thearchivedescription()quotweirdquot interaction
版权声明:本文标题:functions - How to display the_archive_title() and the_archive_description() - "weird" interaction 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745562865a2663579.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论