{"id":79770,"date":"2018-05-19T12:06:39","date_gmt":"2018-05-19T12:06:39","guid":{"rendered":"https:\/\/br.wordpress.org\/support\/?post_type=topic&#038;p=79770"},"modified":"2018-05-19T16:21:23","modified_gmt":"2018-05-19T16:21:23","slug":"listas-taxonomias-por-data","status":"publish","type":"topic","link":"https:\/\/br.wordpress.org\/support\/topic\/listas-taxonomias-por-data\/","title":{"rendered":"Listas taxonomias por data"},"content":{"rendered":"<p>Bom dia pessoal, atualmente, estou com um problema, tenho um blog no qual tenho um tamplate que lista todos os artigos por data e dia =&gt; https:\/\/minimus.life\/artigos<\/p>\n<p>Por\u00e9m quero fazer o mesmo com a taxonomia podcast =&gt; https:\/\/minimus.life\/minimuscast fiz uma adapta\u00e7\u00e3o do c\u00f3digo da pagina de posts para a de podcast sem sucesso, algu\u00e9m pode me dar uma luz para resolver o problema, segue o codido da p\u00e1gina que lista todos os posts.<\/p>\n<pre><code>&lt;?php\n\n                    $current_date =&quot;&quot;;\n\n                    $count_posts = wp_count_posts();\n\n                    $nextpost = 0;\n\n                    $published_posts = $count_posts-&gt;publish;\n\n                    $myposts = get_posts(array(&#039;posts_per_page&#039;=&gt;$published_posts)); \n\n\t                foreach($myposts as $post) :\n\n                         $nextpost++;\n\n                         setup_postdata($post);\n\n                         $date = get_the_date(&quot;F Y&quot;);   \n\n                         if($current_date!=$date): \n\n                              if($nextpost&gt;1): ?&gt; \n\n                                   &lt;\/ul&gt;\n\n                              &lt;?php endif; ?&gt; \n\n                             &lt;div style=&quot;text-transform:capitalize; font-weight: 600; text-decoration: underline; margin-bottom: 25px;margin-top: 30px;&quot;&gt;&lt;?php echo $date; ?&gt;&lt;\/div&gt;&lt;ul start = &quot;&lt;?php echo $nextpost; ?&gt;&quot;&gt;\n\n                              &lt;?php $current_date=$date;\n\n                         endif; ?&gt;\n\n                         &lt;li&gt;(&lt;?php the_time(&#039;d&#039;) ?&gt;) &lt;a class=&quot;linkum&quot; style=&quot;font-weight: 400;&quot; href = &quot;&lt;?php the_permalink(); ?&gt;&quot;&gt;&lt;?php the_title(); ?&gt;&lt;\/a&gt;&lt;\/li&gt;\n\n                    &lt;?php endforeach; wp_reset_postdata(); ?&gt;<\/code><\/pre>\n","protected":false},"template":"","class_list":["post-79770","topic","type-topic","status-publish","hentry","topic-tag-listar-taxonomias","topic-tag-taxonimia","topic-tag-taxonomias"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/br.wordpress.org\/support\/wp-json\/wp\/v2\/topic\/79770","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/br.wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/br.wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":1,"href":"https:\/\/br.wordpress.org\/support\/wp-json\/wp\/v2\/topic\/79770\/revisions"}],"predecessor-version":[{"id":79775,"href":"https:\/\/br.wordpress.org\/support\/wp-json\/wp\/v2\/topic\/79770\/revisions\/79775"}],"wp:attachment":[{"href":"https:\/\/br.wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=79770"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}