{"id":150,"date":"2007-04-09T21:14:02","date_gmt":"2007-04-09T17:14:02","guid":{"rendered":"http:\/\/www.sonika.ru\/blog\/wordpress\/custom-category-page-text.htm"},"modified":"2008-04-01T15:48:35","modified_gmt":"2008-04-01T12:48:35","slug":"custom-category-page-text","status":"publish","type":"post","link":"http:\/\/www.sonika.ru\/blog\/wordpress\/custom-category-page-text.htm","title":{"rendered":"\u041a\u0430\u043a \u0432\u044b\u0432\u0435\u0441\u0442\u0438 \u0441\u0432\u043e\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0434\u043b\u044f \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438 \u0432 WordPress"},"content":{"rendered":"<p>\u0421\u0435\u0433\u043e\u0434\u043d\u044f \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u043b\u0430 \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u043b\u0435\u0437\u043d\u0443\u044e \u0444\u0438\u0447\u0443 \u0434\u043b\u044f WordPress, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043e\u0431\u0440\u0430\u0434\u043e\u0432\u0430\u043b\u0430 \u043c\u0435\u043d\u044f \u0447\u0435\u0440\u0435\u0437\u0432\u044b\u0447\u0430\u0439\u043d\u043e.<\/p>\n<p>\u0412\u0441\u0435 \u0434\u0435\u043b\u043e \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0447\u0430\u0441\u0442\u043e \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438 (\u0442\u0430\u043c, \u0433\u0434\u0435 \u0441\u043f\u0438\u0441\u043e\u043a \u043f\u043e\u0441\u0442\u043e\u0432 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0439 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438) \u0432\u044b\u0432\u0435\u0441\u0442\u0438 \u0432\u0441\u0442\u0443\u043f\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0441\u043b\u043e\u0432\u043e, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 <strong>\u00ab\u0412\u044b \u043f\u0440\u043e\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u0442\u0435 \u0440\u0443\u0431\u0440\u0438\u043a\u0443 \u00ab\u041a\u0443\u043b\u0438\u043d\u0430\u0440\u043d\u044b\u0435 \u0440\u0435\u0446\u0435\u043f\u0442\u044b\u00bb, \u0437\u0434\u0435\u0441\u044c \u0441\u043e\u0431\u0440\u0430\u043d\u044b \u0432\u0441\u0435 \u043c\u043e\u0438 \u043b\u044e\u0431\u0438\u043c\u044b\u0435 \u0440\u0435\u0446\u0435\u043f\u0442\u044b \u043f\u0440\u0438\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u044f\u0438\u0446 \u0432\u0441\u043c\u044f\u0442\u043a\u0443, \u043d\u0430\u0441\u043b\u0430\u0436\u0434\u0430\u0439\u0442\u0435\u0441\u044c!\u00bb<\/strong>.<\/p>\n<p>\u0412\u043e\u043e\u0431\u0449\u0435\u043c-\u0442\u043e \u043d\u0435\u0441\u043b\u043e\u0436\u043d\u043e \u0432\u044b\u0432\u0435\u0441\u0442\u0438 \u0442\u0430\u043a\u043e\u0439 \u0442\u0435\u043a\u0441\u0442 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438 \u0441 <a href=\"http:\/\/codex.wordpress.org\/Conditional_Tags\" title=\"Conditional Tags\">\u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0443\u0441\u043b\u043e\u0432\u0438\u0439<\/a> in_category (5), \u043d\u043e \u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437 \u043f\u0440\u0438 \u0432\u043d\u0435\u0441\u0435\u043d\u0438\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u0432 \u0442\u0435\u043a\u0441\u0442 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0438\u043b\u0438 \u0437\u0430\u0432\u0435\u0434\u0435\u043d\u0438\u0438 \u043d\u043e\u0432\u043e\u0439 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438 \u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043b\u043e \u043f\u0440\u0430\u0432\u0438\u0442\u044c \u043a\u043e\u0434 \u0444\u0430\u0439\u043b\u043e\u0432 \u0422\u0435\u043c\u044b, \u043d\u0435\u0443\u0434\u043e\u0431\u043d\u043e.<\/p>\n<p>\u041d\u043e \u0442\u0435\u043f\u0435\u0440\u044c \u044f \u0437\u043d\u0430\u044e \u2014 \u0435\u0441\u0442\u044c \u0441\u043f\u043e\u0441\u043e\u0431 \u043b\u0443\u0447\u0448\u0435!<\/p>\n<p><!--more--><\/p>\n<p>\u041e\u0431\u0440\u0430\u0449\u0430\u043b\u0438 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u043f\u043e\u043b\u0435 \u00ab\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435: (\u043d\u0435 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e)\u00bb \u043f\u0440\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u0438\u043b\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0438 \u0440\u0443\u0431\u0440\u0438\u043a\u0438 \u0432 \u0430\u0434\u043c\u0438\u043d\u043a\u0435? \u042f \u0432\u0441\u0435 \u0432\u0440\u0435\u043c\u044f \u0433\u0430\u0434\u0430\u043b\u0430, \u0434\u043b\u044f \u0447\u0435\u0433\u043e \u0436\u0435 \u043e\u043d\u043e. \u041e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f, \u0442\u0443\u0434\u0430 \u043c\u043e\u0436\u043d\u043e \u0432\u043f\u0438\u0441\u0430\u0442\u044c \u0442\u043e\u0442 \u0441\u0430\u043c\u044b\u0439 \u0442\u0435\u043a\u0441\u0442 (\u00ab\u0412\u044b \u043f\u0440\u043e\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u0442\u0435 \u0440\u0443\u0431\u0440\u0438\u043a\u0443\u2026\u00bb) \u0438 \u043e\u043d \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043a\u0430\u0437\u0430\u043d \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438!<\/p>\n<p>\u0412\u0441\u0435\u0433\u043e-\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 \u0444\u0430\u0439\u043b category.php \u0438\u043b\u0438 archive.php (\u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a\u043e\u0439 \u0448\u0430\u0431\u043b\u043e\u043d \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0432\u044b\u0432\u043e\u0434\u0430 \u0440\u0443\u0431\u0440\u0438\u043a) \u0442\u0430\u043a\u043e\u0439 \u043a\u043e\u0434:<\/p>\n<pre><code class=\"php\">\r\n&lt;?php if ( $paged &lt; 2 ) {\r\n\/\/ Do stuff specific to first page\r\n?&gt;\r\n&lt;?php if ( is_category() ) : ?&gt;\r\n&lt;h2 id=\"category-name-header\"&gt;\r\n&lt;?php echo $cache_categories[$cat]-&gt;cat_name ?&gt;\r\n&lt;\/h2&gt;\r\n&lt;?php add_filter('category_description', 'wpautop'); ?&gt;\r\n&lt;?php add_filter('category_description', 'wptexturize'); ?&gt;\r\n&lt;div id=\"category-description\"&gt;\r\n&lt;?php echo category_description(); ?&gt;\r\n&lt;\/div&gt;\r\n&lt;?php endif; ?&gt;\r\n&lt;?php } else {\r\n\/\/ Do stuff specific to non-first page\r\n?&gt;\r\n&lt;?php } ?&gt;\r\n<\/code><\/pre>\n<p>\u042d\u0442\u043e\u0442 \u043a\u043e\u0434 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u044c \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430 \u043f\u0435\u0440\u0432\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 \u044d\u0442\u043e\u0439 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438 (\u0435\u0441\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u044c \u0447\u0442\u043e-\u043d\u0438\u0431\u0443\u0434\u044c \u0434\u043b\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u0441\u0442\u0440\u0430\u043d\u0438\u0446 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438 \u2014 Do stuff specific to non-first page).<\/p>\n<p>\u0415\u0441\u043b\u0438 \u043d\u0443\u0436\u043d\u043e \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u044c \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0440\u0443\u0431\u0440\u0438\u043a\u0438 \u043d\u0430 \u0432\u0441\u0435\u0445 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430\u0445, \u0442\u043e \u043a\u043e\u0434 \u0431\u0443\u0434\u0435\u0442 \u0442\u0430\u043a\u043e\u0439:<\/p>\n<pre><code class=\"php\">\r\n&lt;?php if ( is_category() ) : ?&gt;\r\n&lt;h2 id=\"category-name-header\"&gt;\r\n&lt;?php echo $cache_categories[$cat]-&gt;cat_name ?&gt; Category\r\n&lt;\/h2&gt;\r\n&lt;?php add_filter('category_description', 'wpautop'); ?&gt;\r\n&lt;?php add_filter('category_description', 'wptexturize'); ?&gt;\r\n&lt;div id=\"category-description\"&gt;\r\n&lt;?php echo category_description(); ?&gt;\r\n&lt;\/div&gt;\r\n&lt;?php endif; ?&gt;\r\n<\/code><\/pre>\n<p>\u041c\u0435\u043d\u044f \u043e\u0433\u043e\u0440\u0447\u0438\u043b\u0438 \u0442\u043e\u043b\u044c\u043a\u043e 2 \u0432\u0435\u0449\u0438: \u043d\u0435\u043b\u044c\u0437\u044f \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c html \u043a\u043e\u0434 \u0432 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0438, \u0438 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438 \u0443 \u043c\u0435\u043d\u044f \u043d\u0435 \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u0441\u044f\u2026(&lt;h2 id=\"category-name-header\"&gt;\u0431\u043b\u0430-\u0431\u043b\u0430&lt;\/h2&gt;)\u2026<\/p>\n<p>\u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u043c\u0435\u0441\u0442\u043e<\/p>\n<pre><code class=\"php\">\r\n&lt;h2 id=\"category-name-header\"&gt;\r\n&lt;?php echo $cache_categories[$cat]-&gt;cat_name ?&gt; Category\r\n&lt;\/h2&gt;\r\n<\/code><\/pre>\n<p>\u044f \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0430 \u0442\u0430\u043a\u043e\u0439 \u043a\u043e\u0434:<\/p>\n<pre><code class=\"php\">\r\n&lt;h2 id=\"category-name-header\"&gt;\r\n&lt;?php single_cat_title(); ?&gt;\r\n&lt;\/h2&gt;\r\n<\/code><\/pre>\n<p>\u0448\u0441\u0442\u043e\u0447\u043d\u0438\u043a \u0440\u0430\u0434\u043e\u0441\u0442\u0438 \u2014 \u041a\u043e\u0434\u0435\u043a\u0441 WordPress: <a href=\"http:\/\/codex.wordpress.org\/Category_Templates#Custom_Category_Page_Text\" title=\"Custom Category Page Text\">Custom Category Page Text<\/a>.<\/p>\n<p>\u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e: \u043f\u0440\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u0422\u0435\u043c \u0434\u043b\u044f WordPress \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0437\u0434\u0435\u0441\u044c: <a href=\"http:\/\/codex.wordpress.org\/Template_Hierarchy\" title=\"Template Hierarchy\">\u0438\u0435\u0440\u0430\u0440\u0445\u0438\u044f \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432 \u0434\u043b\u044f WordPress<\/a>, english, \u0441 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430\u043c\u0438 :)<\/p>\n<p>\u041e \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u0445: \u0440\u0443\u0431\u0440\u0438\u043a\u0430 = \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u044f, \u0448\u0430\u0431\u043b\u043e\u043d = php \u0444\u0430\u0439\u043b \u0422\u0435\u043c\u044b.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0421\u0435\u0433\u043e\u0434\u043d\u044f \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u043b\u0430 \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u043b\u0435\u0437\u043d\u0443\u044e \u0444\u0438\u0447\u0443 \u0434\u043b\u044f WordPress, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043e\u0431\u0440\u0430\u0434\u043e\u0432\u0430\u043b\u0430 \u043c\u0435\u043d\u044f \u0447\u0435\u0440\u0435\u0437\u0432\u044b\u0447\u0430\u0439\u043d\u043e. \u0412\u0441\u0435 \u0434\u0435\u043b\u043e \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0447\u0430\u0441\u0442\u043e \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438 (\u0442\u0430\u043c, \u0433\u0434\u0435 \u0441\u043f\u0438\u0441\u043e\u043a \u043f\u043e\u0441\u0442\u043e\u0432 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0439 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438) \u0432\u044b\u0432\u0435\u0441\u0442\u0438 \u0432\u0441\u0442\u0443\u043f\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0441\u043b\u043e\u0432\u043e, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u00ab\u0412\u044b \u043f\u0440\u043e\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u0442\u0435 \u0440\u0443\u0431\u0440\u0438\u043a\u0443 \u00ab\u041a\u0443\u043b\u0438\u043d\u0430\u0440\u043d\u044b\u0435 \u0440\u0435\u0446\u0435\u043f\u0442\u044b\u00bb, \u0437\u0434\u0435\u0441\u044c \u0441\u043e\u0431\u0440\u0430\u043d\u044b \u0432\u0441\u0435 \u043c\u043e\u0438 \u043b\u044e\u0431\u0438\u043c\u044b\u0435 \u0440\u0435\u0446\u0435\u043f\u0442\u044b \u043f\u0440\u0438\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u044f\u0438\u0446 \u0432\u0441\u043c\u044f\u0442\u043a\u0443, \u043d\u0430\u0441\u043b\u0430\u0436\u0434\u0430\u0439\u0442\u0435\u0441\u044c!\u00bb. \u0412\u043e\u043e\u0431\u0449\u0435\u043c-\u0442\u043e \u043d\u0435\u0441\u043b\u043e\u0436\u043d\u043e \u0432\u044b\u0432\u0435\u0441\u0442\u0438 \u0442\u0430\u043a\u043e\u0439 \u0442\u0435\u043a\u0441\u0442 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438 \u0441 [&hellip;]<\/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":[21],"class_list":["post-150","post","type-post","status-publish","format-standard","hentry","category-wordpress","tag-plaginy"],"_links":{"self":[{"href":"http:\/\/www.sonika.ru\/blog\/wp-json\/wp\/v2\/posts\/150","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=150"}],"version-history":[{"count":0,"href":"http:\/\/www.sonika.ru\/blog\/wp-json\/wp\/v2\/posts\/150\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.sonika.ru\/blog\/wp-json\/wp\/v2\/media?parent=150"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.sonika.ru\/blog\/wp-json\/wp\/v2\/categories?post=150"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.sonika.ru\/blog\/wp-json\/wp\/v2\/tags?post=150"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}