{"id":608,"date":"2008-09-22T21:10:42","date_gmt":"2008-09-22T17:10:42","guid":{"rendered":"http:\/\/www.sonika.ru\/blog\/?p=608"},"modified":"2018-09-12T17:13:06","modified_gmt":"2018-09-12T14:13:06","slug":"chekbox-publish-in-homepage","status":"publish","type":"post","link":"http:\/\/www.sonika.ru\/blog\/wordpress\/chekbox-publish-in-homepage.htm","title":{"rendered":"\u0427\u0435\u043a\u0431\u043e\u043a\u0441 \u00ab\u041e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u0442\u044c \u043d\u0430 \u0433\u043b\u0430\u0432\u043d\u043e\u0439\u00bb"},"content":{"rendered":"<p><a href=\"http:\/\/www.sonika.ru\/blog\/wordpress\/chekbox-publish-in-homepage.htm\">sonika.ru<\/a> \u041e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f, \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0432 WordPress \u0447\u0435\u043a\u0431\u043e\u043a\u0441 \u00ab\u043e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u0442\u044c \u043d\u0430 \u0433\u043b\u0430\u0432\u043d\u043e\u0439\u00bb \u043d\u0435\u0438\u043c\u043e\u0432\u0435\u0440\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e! \u0412 \u044d\u0442\u043e\u043c \u043f\u043e\u0443\u0447\u0430\u0432\u0441\u0442\u0432\u0443\u044e\u0442 \u043c\u043e\u0438 \u043b\u044e\u0431\u0438\u043c\u044b\u0435 <a href=\"http:\/\/www.sonika.ru\/blog\/tag\/custom-fields\">custom fileds<\/a>.<\/p>\n<p>C\u0443\u0442\u044c \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0437\u0430\u043f\u0438\u0441\u0438 \u0441 \u043e\u0442\u043c\u0435\u0447\u0435\u043d\u043d\u044b\u043c \u0447\u0435\u043a\u0431\u043e\u043a\u0441\u043e\u043c \u043f\u043e\u044f\u0432\u044f\u0442\u0441\u044f \u043d\u0430 \u0433\u043b\u0430\u0432\u043d\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 \u0431\u043b\u043e\u0433\u0430, \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u2014 \u043d\u0435\u0442.<!--more--><\/p>\n<p><span style=\"color: #ff0000;\">UPD <a href=\"http:\/\/blog.portal.kharkov.ua\/\">\u042e.\u0411.<\/a> \u043d\u0430\u043f\u0438\u0441\u0430\u043b<\/span> <a href=\"http:\/\/mywordpress.ru\/plugins\/on-home-page\/\">\u043f\u043b\u0430\u0433\u0438\u043d On Home Page<\/a>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u00ab\u0432\u0441\u0451 \u0441\u0434\u0435\u043b\u0430\u0435\u0442 \u0441\u0430\u043c\u00bb.<\/p>\n<p>\u0414\u043b\u044f \u043d\u0435\u0447\u0430\u0439\u043d\u0438\u043a\u043e\u0432: \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u0441\u0440\u0430\u0437\u0443 \u043a <a href=\"#comehere\">\u043d\u0443\u0436\u043d\u043e\u043c\u0443 \u0430\u0431\u0437\u0430\u0446\u0443<\/a>.<\/p>\n<p>\u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u043e\u0435 \u043f\u043e\u043b\u0435 \u0441  \u043a\u043b\u044e\u0447\u0435\u043c <strong>\u043e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u0442\u044c \u043d\u0430 \u0433\u043b\u0430\u0432\u043d\u043e\u0439<\/strong> \u0438 \u0432 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0435\u043c\u0443 \u043f\u0438\u0448\u0435\u043c <strong>1<\/strong>. \u0412\u0441\u0435 \u044d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u0432 \u0431\u043e\u043b\u0435\u0435 \u0431\u043e\u0436\u0435\u0441\u043a\u0438\u0439 \u0432\u0438\u0434 \u0438 \u043f\u043e\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u0447\u0435\u043a\u0431\u043e\u043a\u0441 \u043f\u043e\u0434 \u043f\u043e\u043b\u0435\u043c \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0437\u0430\u043f\u0438\u0441\u0438 \u2014 \u0434\u043b\u044f \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f. \u0411\u0435\u0440\u0435\u043c \u043b\u044e\u0431\u043e\u0439 \u043f\u043b\u0430\u0433\u0438\u043d \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 custom fields \u0432 \u0430\u0434\u043c\u0438\u043d. \u043f\u0430\u043d\u0435\u043b\u0438:<\/p>\n<ul>\n<li><strong>Custom Write Panel<\/strong> \u0434\u043b\u044f wp  2.2<br \/>\n<code>wordpress.org\/extend\/plugins\/custom-write-panel\/<\/code><\/li>\n<li><strong>Freshpost<\/strong> \u0434\u043b\u044f wp 2.3 \u20142.6 (\u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f \u043f\u043b\u0430\u0433\u0438\u043d\u0430 Custom Write Panel)<br \/>\n<code>wordpress.org\/extend\/plugins\/fresh-page\/<\/code><\/li>\n<li><strong>Flutter<\/strong> \u2014 \u0431\u043e\u043b\u0435\u0435 \u043d\u0430\u0432\u043e\u0440\u043e\u0447\u0435\u043d\u043d\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f Freshpost (\u0434\u043b\u044f wp 2.5 \u0438 \u0432\u044b\u0448\u0435)<br \/>\n<code>freshout.us\/goodies\/fresh-post-for-wordpress-wordpress-cms\/<\/code><\/li>\n<li><strong>more fields<\/strong><br \/>\n<code>wordpress.org\/extend\/plugins\/more-fields\/<\/code><\/li>\n<li>\u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u043f\u043b\u0430\u0433\u0438\u043d <strong>Custom Field GUI<\/strong><br \/>\n<code>rhymedcode.net\/custom-field-gui\/custom-field-gui\/<\/code><\/li>\n<li> \u0438\u043b\u0438 Custom Field GUI \u0432 \u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u041c\u0430\u043a\u0441\u0438\u043c\u0430  \u00ab<strong><a href=\"http:\/\/maxsite.org\/ras30\">MaxSite - \u041f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u044b\u0435 \u043f\u043e\u043b\u044f<\/a><\/strong>\u00bb<\/li>\n<\/ul>\n<p>\u041d\u0435\u0442 \u043d\u0438\u043a\u0430\u043a\u043e\u0439 \u0440\u0430\u0437\u043d\u0438\u0446\u044b \u043a\u0430\u043a\u043e\u0439 \u043f\u043b\u0430\u0433\u0438\u043d \u0432\u044b \u0431\u0443\u0434\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u0432\u044b\u0432\u043e\u0434\u0430 \u0447\u0435\u043a\u0431\u043e\u043a\u0441\u0430 \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f\/\u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0437\u0430\u043f\u0438\u0441\u0435\u0439, \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044f \u043e\u0434\u043d\u0443 \u0438 \u0442\u0443 \u0436\u0435 \u0437\u0430\u0434\u0430\u0447\u0443 (\u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 custom fields \u0432 \u0430\u0434\u043c\u0438\u043d. \u043f\u0430\u043d\u0435\u043b\u0438) \u044d\u0442\u0438 \u043f\u043b\u0430\u0433\u0438\u043d\u044b \u043f\u0440\u043e\u0441\u0442\u043e \u043e\u0442\u043b\u0438\u0447\u0430\u044e\u0442\u0441\u044f \u0441\u0442\u0435\u043f\u0435\u043d\u044c\u044e \u043d\u0430\u0432\u043e\u0440\u043e\u0447\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0438 \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u044b\u043c \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u043c \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u044b\u043c\u0438 \u043f\u043e\u043b\u044f\u043c\u0438.<\/p>\n<p>\u041f\u043e\u043a\u0430\u0436\u0443 \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043f\u043b\u0430\u0433\u0438\u043d\u0430 \u00abMaxSite - \u041f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u044b\u0435 \u043f\u043e\u043b\u044f\u00bb, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441\u043e \u0432\u0441\u0435\u043c\u0438 \u0432\u0435\u0440\u0441\u0438\u044f\u043c\u0438 WordPress.<\/p>\n<p>\u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043f\u043b\u0430\u0433\u0438\u043d, \u0431\u0435\u0440\u0435\u043c \u0444\u0430\u0439\u043b <code>conf-sample.ini<\/code> \u0438 \u043f\u0435\u0440\u0435\u0438\u043c\u0435\u043d\u043e\u0432\u044b\u0432\u0430\u0435\u043c \u0435\u0433\u043e \u0432 <code>conf.ini<\/code>, \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0444\u0430\u0439\u043b\u0430 \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u0442\u0430\u043a\u0438\u043c <code>conf.ini<\/code>:<\/p>\n<pre>\r\n[\u041e\u0442\u043c\u0435\u0442\u044c\u0442\u0435, \u0447\u0442\u043e\u0431\u044b \u043e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u0442\u044c \u043d\u0430 \u0433\u043b\u0430\u0432\u043d\u043e\u0439]\r\ntype = checkbox\r\nmymeta = \u043e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u0442\u044c \u043d\u0430 \u0433\u043b\u0430\u0432\u043d\u043e\u0439\r\n<\/pre>\n<p>\u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c <code>conf.ini<\/code> \u0432 \u043f\u0430\u043f\u043a\u0443 \u043f\u043b\u0430\u0433\u0438\u043d\u0430 rc-custom-field-gui. \u0412\u0441\u0435 \u0433\u043e\u0442\u043e\u0432\u043e, \u0447\u0435\u043a\u0431\u043e\u043a\u0441 \u043d\u0430 \u043c\u0435\u0441\u0442\u0435, \u043e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u0447\u0443\u0442\u044c \u043c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u0434 \u0433\u043b\u0430\u0432\u043d\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b. \u0417\u0430 \u0432\u044b\u0432\u043e\u0434 \u0437\u0430\u043f\u0438\u0441\u0435\u0439 \u043d\u0430 \u0433\u043b\u0430\u0432\u043d\u043e\u0439 \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0444\u0430\u0439\u043b-\u0448\u0430\u0431\u043b\u043e\u043d <code>home.php<\/code> \u0438\u043b\u0438 <code>index.php<\/code> (\u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0432\u0430\u0448\u0435\u0439 \u0422\u0435\u043c\u044b, \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u0447\u0438\u0442\u0430\u0439\u0442\u0435 <a href=\"http:\/\/www.sonika.ru\/blog\/wordpress\/template-hierarchy.htm\">\u0442\u0443\u0442 \u043e \u0438\u0435\u0440\u0430\u0440\u0445\u0438\u0438 \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432<\/a>).<\/p>\n<p><a name=\"comehere\"><\/a>\u041f\u0435\u0440\u0435\u0434 \u043d\u0430\u0447\u0430\u043b\u043e\u043c \u0446\u0438\u043a\u043b\u0430 (\u043b\u0443\u043f, \u043e\u043d \u0436\u0435 Loop) \u043f\u0438\u0448\u0435\u043c:<\/p>\n<pre class=\"slh__php\">\r\n&lt;?php query_posts($query_string.'&meta_key=\u043e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u0442\u044c \u043d\u0430 \u0433\u043b\u0430\u0432\u043d\u043e\u0439&amp;meta_value=1'); ?&gt;\r\n<\/pre>\n<p>\u0412\u0441\u0435 \u0433\u043e\u0442\u043e\u0432\u043e!<\/p>\n<p>\u0421\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 \u0446\u0438\u043a\u043b (\u043b\u0443\u043f) \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u0441 <code> \u0438 \u0437\u0430\u043a\u0430\u043d\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0441\u0442\u0440\u043e\u0447\u043a\u043e\u0439 <\/code><\/p>\n<h3>\u0422\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f WordPress 2.6 \u0438 \u0432\u044b\u0448\u0435<\/h3>\n<p>\u0414\u043b\u044f \u0442\u0435\u0445, \u043a\u0442\u043e \u0441\u043e\u0432\u0441\u0435\u043c \u0432 \u0442\u0430\u043d\u043a\u0435 :) \u043f\u0440\u0438\u0432\u043e\u0436\u0443 \u043f\u043e\u043b\u043d\u044b\u0439 \u043a\u043e\u0434 \u043b\u0443\u043f\u0430 \u0422\u0435\u043c\u044b default \u0441 \u043d\u0443\u0436\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u0447\u043a\u043e\u0439 <code>query_posts<\/code> \u0432 \u043d\u0430\u0447\u0430\u043b\u0435:<\/p>\n<pre class=\"slh__php\">\r\n&lt;?php query_posts($query_string.'&amp;meta_key=\u043e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u0442\u044c \u043d\u0430 \u0433\u043b\u0430\u0432\u043d\u043e\u0439&amp;meta_value=1'); ?&gt;\r\n&lt;div id=\"post-&lt;?php the_ID(); ?&gt;\" class=\"post\"&gt;\r\n&lt;h2&gt;&lt;a title=\"&lt;?php printf(__('Permanent Link to %s', 'kubrick'), the_title_attribute('echo=0')); ?&gt;\" rel=\"bookmark\" href=&lt;?php the_permalink() ?&gt;\"&gt;&lt;\/a&gt;&lt;\/h2&gt;\r\n&lt;small&gt; by &lt;\/small&gt;\r\n&lt;p class=\"postmetadata\"&gt;'); ?&gt; |&lt;\/p&gt;\r\n&lt;\/div&gt;\r\n<\/pre>\n<h3>\u0414\u043b\u044f WordPress 2.5 \u0438 \u043d\u0438\u0436\u0435<\/h3>\n<p>\u0412 WP 2.5 \u0438 \u043d\u0438\u0436\u0435 \u0432\u0441\u0435 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0441\u043b\u043e\u0436\u043d\u0435\u0435 \u0441 \u0432\u044b\u0432\u043e\u0434\u043e\u043c \u043f\u043e\u0441\u0442\u043e\u0432, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0445 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0439 \u043a\u043b\u044e\u0447 \u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u043e\u043b\u044f, \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 \u0446\u0438\u043a\u043b \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u0435\u0442\u0441\u044f \u0432 \u0442\u0430\u043a\u043e\u0439 (\u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 \u0441\u0442\u0440\u043e\u0447\u043a\u0430\u0445 1--14 \u0438 24):<\/p>\n<pre class=\"slh__php\">\r\n&lt;?php\r\n$querystr = \"\r\nSELECT wposts.*\r\nFROM $wpdb-&gt;posts wposts, $wpdb-&gt;postmeta wpostmeta\r\nWHERE wposts.ID = wpostmeta.post_id\r\nAND wpostmeta.meta_key = '\u043e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u0442\u044c \u043d\u0430 \u0433\u043b\u0430\u0432\u043d\u043e\u0439'\r\nAND wpostmeta.meta_value = '1'\r\nAND wposts.post_status = 'publish'\r\nAND wposts.post_type = 'post'\r\nORDER BY wposts.post_date DESC\r\n\";\r\n$pageposts = $wpdb-&gt;get_results($querystr, OBJECT);\r\n?&gt;\r\n&lt;?php if ($pageposts): foreach ($pageposts as $post): setup_postdata($post); ?&gt;\r\n&lt;div class=\"post\" id=\"post-&lt;?php the_ID(); ?&gt;\"&gt;\r\n&lt;h2&gt;&lt;a href=\"&lt;?php the_permalink() ?&gt;\" rel=\"bookmark\" title=\"&lt;?php printf(__('Permanent Link to %s', 'kubrick'), the_title_attribute('echo=0')); ?&gt;\"&gt;&lt;?php the_title(); ?&gt;&lt;\/a&gt;&lt;\/h2&gt;\r\n&lt;small&gt;&lt;?php the_time(__('F jS, Y', 'kubrick')) ?&gt; &lt;!-- by &lt;?php the_author() ?&gt; --&gt;&lt;\/small&gt;\r\n\r\n&lt;div class=\"entry\"&gt;\r\n&lt;?php the_content(__('Read the rest of this entry &amp;raquo;', 'kubrick')); ?&gt;\r\n&lt;\/div&gt;\r\n&lt;p class=\"postmetadata\"&gt;&lt;?php the_tags(__('Tags:', 'kubrick') . ' ', ', ', '&lt;br \/&gt;'); ?&gt; &lt;?php printf(__('Posted in %s', 'kubrick'), get_the_category_list(', ')); ?&gt; | &lt;?php edit_post_link(__('Edit', 'kubrick'), '', ' | '); ?&gt;  &lt;?php comments_popup_link(__('No Comments &amp;#187;', 'kubrick'), __('1 Comment &amp;#187;', 'kubrick'), __('% Comments &amp;#187;', 'kubrick')); ?&gt;&lt;\/p&gt;\r\n&lt;\/div&gt;\r\n&lt;?php endforeach; ?&gt;\r\n&lt;div class=\"navigation\"&gt;\r\n&lt;div class=\"alignleft\"&gt;&lt;?php next_posts_link(__('&amp;laquo; Older Entries', 'kubrick')) ?&gt;&lt;\/div&gt;\r\n&lt;div class=\"alignright\"&gt;&lt;?php previous_posts_link(__('Newer Entries &amp;raquo;', 'kubrick')) ?&gt;&lt;\/div&gt;\r\n&lt;\/div&gt;\r\n&lt;?php else : ?&gt;\r\n&lt;h2 class=\"center\"&gt;&lt;?php _e('Not Found', 'kubrick'); ?&gt;&lt;\/h2&gt;\r\n&lt;p class=\"center\"&gt;&lt;?php _e('Sorry, but you are looking for something that isn&amp;#8217;t here.', 'kubrick'); ?&gt;&lt;\/p&gt;\r\n&lt;?php include (TEMPLATEPATH . \"\/searchform.php\"); ?&gt;\r\n&lt;?php endif; ?&gt;\r\n<\/pre>\n<p>\u0421\u043a\u0440\u0438\u043d\u0448\u043e\u0442:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-617\" title=\"checkbox-custom-field\" src=\"http:\/\/www.sonika.ru\/blog\/wp-content\/uploads\/2008\/09\/checkbox-custom-field.png\" alt=\"\" width=\"500\" height=\"277\" \/><\/p>\n<p>\u0422\u0430\u043a\u0438\u043c \u0436\u0435 \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u044c \u0435\u0449\u0435 \u043e\u0434\u0438\u043d \u0446\u0438\u043a\u043b \u0432 \u0441\u0430\u0439\u0434\u0431\u0430\u0440\u0435 \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0432\u044b\u0432\u0435\u0434\u0435\u043c 10 \u0437\u0430\u043f\u0438\u0441\u0435\u0439 \u0438\u0437 \u0440\u0443\u0431\u0440\u0438\u043a\u0438 \u0441 id=34 \u0441 \u043e\u0442\u043c\u0435\u0447\u0435\u043d\u043d\u043e\u0439 \u0433\u0430\u043b\u043e\u0447\u043a\u043e\u0439 \u00ab\u043e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u0442\u044c \u043d\u0430 \u0433\u043b\u0430\u0432\u043d\u043e\u0439\u00bb, \u043a\u043e\u0434 \u0442\u0430\u043a\u043e\u0439:<\/p>\n<pre class=\"slh__php\">\r\n&lt;ul class=\"is_kat\"&gt;\r\n&lt;?php\r\n$posts_new = get_posts('category=34&amp;numberposts=10&amp;meta_key=\u043e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u0442\u044c \u043d\u0430 \u0433\u043b\u0430\u0432\u043d\u043e\u0439&amp;meta_value=1');\r\nforeach ($posts_new as $post_new) :\r\necho '&lt;li class=\"news_item\"&gt;&lt;a href=\"';\r\necho get_permalink($post_new-&gt;ID);\r\necho '\"&gt;';\r\necho mysql2date('j.m.Y',  $post_new-&gt;post_date);\r\necho ' - ';\r\necho $post_new-&gt;post_title;\r\necho '&lt;\/a&gt;&lt;\/li&gt;';\r\nendforeach;\r\n?&gt;\r\n&lt;\/ul&gt;\r\n<\/pre>\n<p>\u041c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0432\u0430\u0440\u0438\u0430\u0446\u0438\u0439 \u044d\u0442\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u0432 <a rel=\"noindex\" href=\"http:\/\/forum.maxsite.org\/viewtopic.php?id=670\">\u0434\u0430\u043d\u043d\u043e\u043c \u0442\u043e\u043f\u0438\u043a\u0435 \u0444\u043e\u0440\u0443\u043c\u0430<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>sonika.ru \u041e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f, \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0432 WordPress \u0447\u0435\u043a\u0431\u043e\u043a\u0441 \u00ab\u043e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u0442\u044c \u043d\u0430 \u0433\u043b\u0430\u0432\u043d\u043e\u0439\u00bb \u043d\u0435\u0438\u043c\u043e\u0432\u0435\u0440\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e! \u0412 \u044d\u0442\u043e\u043c \u043f\u043e\u0443\u0447\u0430\u0432\u0441\u0442\u0432\u0443\u044e\u0442 \u043c\u043e\u0438 \u043b\u044e\u0431\u0438\u043c\u044b\u0435 custom fileds. C\u0443\u0442\u044c \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0437\u0430\u043f\u0438\u0441\u0438 \u0441 \u043e\u0442\u043c\u0435\u0447\u0435\u043d\u043d\u044b\u043c \u0447\u0435\u043a\u0431\u043e\u043a\u0441\u043e\u043c \u043f\u043e\u044f\u0432\u044f\u0442\u0441\u044f \u043d\u0430 \u0433\u043b\u0430\u0432\u043d\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 \u0431\u043b\u043e\u0433\u0430, \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u2014 \u043d\u0435\u0442.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12],"tags":[37,28,30],"class_list":["post-608","post","type-post","status-publish","format-standard","hentry","category-wordpress","tag-custom-fields","tag-wordpress-kak-cms","tag-wp-tricks"],"_links":{"self":[{"href":"http:\/\/www.sonika.ru\/blog\/wp-json\/wp\/v2\/posts\/608","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.sonika.ru\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.sonika.ru\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.sonika.ru\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.sonika.ru\/blog\/wp-json\/wp\/v2\/comments?post=608"}],"version-history":[{"count":9,"href":"http:\/\/www.sonika.ru\/blog\/wp-json\/wp\/v2\/posts\/608\/revisions"}],"predecessor-version":[{"id":1091,"href":"http:\/\/www.sonika.ru\/blog\/wp-json\/wp\/v2\/posts\/608\/revisions\/1091"}],"wp:attachment":[{"href":"http:\/\/www.sonika.ru\/blog\/wp-json\/wp\/v2\/media?parent=608"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.sonika.ru\/blog\/wp-json\/wp\/v2\/categories?post=608"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.sonika.ru\/blog\/wp-json\/wp\/v2\/tags?post=608"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}