{"id":232747,"date":"2023-01-28T18:20:00","date_gmt":"2023-01-28T15:20:00","guid":{"rendered":"https:\/\/wordpress.mediadoma.com\/?p=232747"},"modified":"2023-01-28T18:21:25","modified_gmt":"2023-01-28T15:21:25","slug":"jak-pokazati-publikacii-istorichnogo-sogodni-v-wordpress","status":"publish","type":"post","link":"https:\/\/wordpress.mediadoma.com\/uk\/jak-pokazati-publikacii-istorichnogo-sogodni-v-wordpress\/","title":{"rendered":"\u042f\u043a \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0438 \u043f\u0443\u0431\u043b\u0456\u043a\u0430\u0446\u0456\u0457 \u0456\u0441\u0442\u043e\u0440\u0438\u0447\u043d\u043e\u0433\u043e \u00ab\u0421\u044c\u043e\u0433\u043e\u0434\u043d\u0456\u00bb \u0432 WordPress?"},"content":{"rendered":"<p>\u0412\u0438 \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u043a\u0430\u0437\u0443\u0432\u0430\u0442\u0438 \u00ab\u041f\u043e\u0432&#8217;\u044f\u0437\u0430\u043d\u0456\u00bb \u043f\u0443\u0431\u043b\u0456\u043a\u0430\u0446\u0456\u0457 (\u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u043e\u0432\u0443\u044e\u0447\u0438 \u0442\u0435\u0433\u0438, \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0456\u0457 \u0447\u0438 \u0456\u043d\u0448\u0456 \u043a\u043b\u044e\u0447\u043e\u0432\u0456 \u0441\u043b\u043e\u0432\u0430), \u0449\u043e\u0431 \u0437\u0430\u043b\u0443\u0447\u0438\u0442\u0438 \u0431\u0456\u043b\u044c\u0448\u0435 \u043f\u0435\u0440\u0435\u0433\u043b\u044f\u0434\u0456\u0432 \u0441\u0442\u043e\u0440\u0456\u043d\u043e\u043a. \u041a\u0440\u0456\u043c \u0442\u043e\u0433\u043e, \u0432\u0438 \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0438 \u0456\u0441\u0442\u043e\u0440\u0438\u0447\u043d\u0456 \u043f\u0443\u0431\u043b\u0456\u043a\u0430\u0446\u0456\u0457 \u00ab\u0421\u044c\u043e\u0433\u043e\u0434\u043d\u0456\u00bb \u0432 \u043c\u0438\u043d\u0443\u043b\u043e\u043c\u0443 \u0432 \u043a\u0456\u043d\u0446\u0456 \u0432\u043c\u0456\u0441\u0442\u0443 \u043f\u0443\u0431\u043b\u0456\u043a\u0430\u0446\u0456\u0457. \u0421\u043a\u043e\u043f\u0456\u044e\u0439\u0442\u0435 \u043d\u0430\u0441\u0442\u0443\u043f\u043d\u0438\u0439 PHP-\u043a\u043e\u0434 \u0456 \u0440\u043e\u0437\u043c\u0456\u0441\u0442\u0456\u0442\u044c \u0439\u043e\u0433\u043e \u0432 \u043a\u0456\u043d\u0446\u0456 \u0448\u0430\u0431\u043b\u043e\u043d\u0443 \u0444\u0443\u043d\u043a\u0446\u0456\u0457 wordpress functions.php<strong>,<\/strong> \u0431\u0430\u0436\u0430\u043d\u043e \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u043e\u0432\u0443\u044e\u0447\u0438 <a href=\"https:\/\/wordpress.mediadoma.com\/uk\/dochirnja-tema-wordpress-iedine-shho-vam-potribno-znati\/\" title=\"\u0434\u043e\u0447\u0456\u0440\u043d\u044e \u0442\u0435\u043c\u0443\">\u0434\u043e\u0447\u0456\u0440\u043d\u044e \u0442\u0435\u043c\u0443<\/a>.<\/p>\n<pre><code>function today_in_histroy(){\n\u00a0 \u00a0 $today = getdate();\n\u00a0 \u00a0 $args = array(\n\u00a0 \u00a0 \u00a0 \u00a0 'date_query' =&gt; array(\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 array(\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 'year' \u00a0 \u00a0 \u00a0=&gt; $today['year'],\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 'compare' \u00a0 =&gt; '!=',\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 ),\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 array(\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 'month' =&gt; $today['mon'],\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 'day' \u00a0 =&gt; $today['mday'],\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 ),\n\u00a0 \u00a0 \u00a0 \u00a0 ),\n\u00a0 \u00a0 );\n\u00a0 \u00a0 $postlist = get_posts($args);\n\u00a0 \u00a0 $html = '&lt;h3 class=\"tih-title\"&gt;Posts of Historic Today&lt;\/h3&gt;&lt;ul class=\"tih-title-list\"&gt;';\n\u00a0 \u00a0 if(!empty($postlist)){\n\u00a0 \u00a0 \u00a0 \u00a0 foreach ($postlist as $key =&gt; $post) {\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 $html .= '&lt;li class=\"tih-title-item\"&gt;&lt;a href=\"'. get_permalink($post-&gt;ID). '\" title=\"'. $post-&gt;post_title. '\"&gt;'. $post-&gt;post_title. '&lt;\/a&gt;&lt;\/li&gt;';\n\u00a0 \u00a0 \u00a0 \u00a0 }\n\u00a0 \u00a0 \u00a0 \u00a0 $html .= '&lt;\/ul&gt;';\n\u00a0 \u00a0 \u00a0 \u00a0 return $html;\n\u00a0 \u00a0 }\n\u00a0 \u00a0 return \"\";\n}\n\u00a0\nfunction add_today_in_histroy($content){\n\u00a0 \u00a0 global $post;\n\u00a0 \u00a0 return \u00a0$content. today_in_histroy(); \n}\nadd_filter('the_content','add_today_in_histroy');<\/code><\/pre>\n<p>\u0406\u0434\u0435\u044f \u043f\u043e\u043b\u044f\u0433\u0430\u0454 \u0432 \u0442\u043e\u043c\u0443, \u0449\u043e\u0431 \u043c\u0430\u0442\u0438 \u0437\u0430\u043f\u0438\u0442, \u044f\u043a\u0438\u0439 \u0448\u0443\u043a\u0430\u0454 \u043f\u043e\u0432\u0456\u0434\u043e\u043c\u043b\u0435\u043d\u043d\u044f \u0442\u0430 \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u043e\u0432\u0443\u0454 <strong>add_filter<\/strong> \u0434\u043b\u044f \u0434\u043e\u0434\u0430\u0432\u0430\u043d\u043d\u044f \u0434\u043e <strong>the_content<\/strong>.<\/p>\n<p>wordpress<\/p>\n<p><div id=\"PostUnique_PostSource\" style=\"padding-top: 50px\">\u0414\u0436\u0435\u0440\u0435\u043b\u043e \u0437\u0430\u043f\u0438\u0441\u0443:  <a target=\"_blank\" rel=\"noopener nofollow\" href=\"\/\/helloacm.com\" class=\"external external_icon\">helloacm.com<\/a><\/div><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u042f\u043a \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0438 \u043f\u0443\u0431\u043b\u0456\u043a\u0430\u0446\u0456\u0457 \u0456\u0441\u0442\u043e\u0440\u0438\u0447\u043d\u043e\u0433\u043e \u00ab\u0421\u044c\u043e\u0433\u043e\u0434\u043d\u0456\u00bb \u0443 WordPress?<\/p>\n","protected":false},"author":1,"featured_media":221210,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":"","_wp_rev_ctl_limit":""},"categories":[808,869,839,902,1000,849,923],"tags":[1174],"class_list":["post-232747","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-php-10","category-wordpress-10","category-kerivnytstvo-dlia-pochatkivtsiv","category-kod-3","category-kontent-marketynh","category-pidruchnyky","category-inshyj","tag-affiai-uk"],"_links":{"self":[{"href":"https:\/\/wordpress.mediadoma.com\/uk\/wp-json\/wp\/v2\/posts\/232747","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.mediadoma.com\/uk\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wordpress.mediadoma.com\/uk\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.mediadoma.com\/uk\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.mediadoma.com\/uk\/wp-json\/wp\/v2\/comments?post=232747"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.mediadoma.com\/uk\/wp-json\/wp\/v2\/posts\/232747\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/wordpress.mediadoma.com\/uk\/wp-json\/wp\/v2\/media\/221210"}],"wp:attachment":[{"href":"https:\/\/wordpress.mediadoma.com\/uk\/wp-json\/wp\/v2\/media?parent=232747"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wordpress.mediadoma.com\/uk\/wp-json\/wp\/v2\/categories?post=232747"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wordpress.mediadoma.com\/uk\/wp-json\/wp\/v2\/tags?post=232747"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}