{"id":15211921,"date":"2022-01-02T15:44:07","date_gmt":"2022-01-02T15:44:07","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/pubdate-php-problem\/"},"modified":"2022-01-02T15:45:14","modified_gmt":"2022-01-02T15:45:14","slug":"pubdate-php-problem","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/pubdate-php-problem\/","title":{"rendered":"pubdate php date not circulation problem"},"content":{"rendered":"<p>I&#8217;ve looked at the php syntax written by the engineer and it&#8217;s fine, but the <a href=\"https:\/\/nsn.com.tw\/xml-feed\" rel=\"noopener\" target=\"_blank\">rss<\/a> display of the pubdate is incomplete. Some of them disappear and only +0800 remains.<br \/>\nDoes anyone know what the problem is?<br \/>\nHere is the engineer&#8217;s syntax, I have looked at it for a long time and have tried many ways but cannot change it. The company requires the use of pubdate syntax.<br \/>\nCan anyone help me? Thank you.<\/p>\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<\/p>\n<pre><code>&lt;?php\n\/*\nTemplate Name: xml Feed\n*\/\nheader(&#039;Content-Type: &#039; . feed_content_type(&#039;rss-http&#039;) . &#039;; charset=&#039; . get_option(&#039;blog_charset&#039;), true);\necho &#039;&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;&#039;;\n?&gt;\n&lt;rss version=&quot;2.0&quot;&gt;\n      &lt;channel&gt;\n    &lt;title&gt;&lt;![CDATA[Wownews RSS \u5f71\u5287\u5a1b\u6a02]]&gt;&lt;\/title&gt;\n    &lt;language&gt;zh_tw&lt;\/language&gt;\n    &lt;link&gt;http:\/\/www.wownews.tw&lt;\/link&gt;\n    &lt;generator&gt;rss_generator&lt;\/generator&gt;\n    &lt;description&gt;&lt;![CDATA[Wownews RSS \u5f71\u5287\u5a1b\u6a02]]&gt;&lt;\/description&gt;\n&lt;?php $experience= new WP_Query( array ( &#039;post_type&#039; =&gt; &#039;post&#039;,&#039;posts_per_page&#039; =&gt; 10));?&gt;\n&lt;?php while($experience-&gt;have_posts()) : $experience-&gt;the_post(); \n\n        $featured_image = wp_get_attachment_url( get_post_thumbnail_id($post-&gt;ID, &#039;thumbnail&#039;) ); \n        $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post-&gt;ID ), &#039;single-post-thumbnail&#039; );\n        $thumb_id = get_post_thumbnail_id();\n $thumb_url_array = wp_get_attachment_image_src($thumb_id, &#039;thumbnail-size&#039;, true);\n $thumb_url = $thumb_url_array[0];\n $imageurl = apply_filters( &#039;jetpack_photon_url&#039;, $thumb_url );\n\n        ?&gt;\n    &lt;item&gt;\n      &lt;title&gt;&lt;![CDATA[&lt;?php the_title();?&gt;]]&gt;&lt;\/title&gt;\n      &lt;description&gt;&lt;![CDATA[&lt;?php the_content();?&gt; ]]&gt;&lt;\/description&gt;\n      &lt;pubDate&gt;&lt;?php the_date( &#039;d, D F Y H:i:s&#039; ); ?&gt; +0800&lt;\/pubDate&gt;\n      &lt;link&gt;&lt;?php the_permalink();?&gt;&lt;\/link&gt;\n      &lt;enclosure url=&quot;&lt;?php echo $imageurl;?&gt;&quot; \/&gt;\n    &lt;\/item&gt;\n&lt;?php endwhile;  ?&gt; \n&lt;\/channel&gt;\n&lt;\/rss&gt;<\/code><\/pre>\n","protected":false},"template":"","class_list":["post-15211921","topic","type-topic","status-publish","hentry","topic-tag-pubdate","topic-tag-rss"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/15211921","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":1,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/15211921\/revisions"}],"predecessor-version":[{"id":15211923,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/15211921\/revisions\/15211923"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=15211921"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}