{"id":5656,"date":"2025-01-09T21:40:47","date_gmt":"2025-01-09T18:40:47","guid":{"rendered":"https:\/\/forestgreen-jay-845795.hostingersite.com\/?p=5656"},"modified":"2025-01-23T18:34:57","modified_gmt":"2025-01-23T15:34:57","slug":"%d0%ba%d0%b0%d0%ba-%d1%81%d0%be%d0%b7%d0%b4%d0%b0%d1%82%d1%8c-%d1%80%d0%b0%d0%bc%d0%ba%d0%b8-%d0%b8-%d0%b8%d0%bb%d0%b8-%d0%b8%d0%b7%d0%bc%d0%b5%d0%bd%d0%b8%d1%82%d1%8c-%d1%86%d0%b2%d0%b5%d1%82-%d1%82","status":"publish","type":"post","link":"https:\/\/newsbee.blog\/wp-tips\/2025\/01\/09\/5656\/","title":{"rendered":"\u041a\u0430\u043a \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0440\u0430\u043c\u043a\u0438 \u0438\/\u0438\u043b\u0438 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0446\u0432\u0435\u0442 \u0442\u0435\u043a\u0441\u0442\u0430 \u0432 \u043f\u043e\u0441\u0442\u0430\u0445 \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u0439 \u0440\u0443\u0431\u0440\u0438\u043a\u0438"},"content":{"rendered":"<p>\u0415\u0441\u043b\u0438 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0437\u0430\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0432 \u0440\u0430\u043c\u043a\u0438 \u043b\u044e\u0431\u043e\u0433\u043e \u0446\u0432\u0435\u0442\u0430 \u043f\u043e\u0441\u0442\u044b \u043a\u0430\u043a\u043e\u0439-\u043b\u0438\u0431\u043e \u0440\u0443\u0431\u0440\u0438\u043a\u0438 (\u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438) \u0438\u043b\u0438 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0446\u0432\u0435\u0442 \u0442\u0435\u043a\u0441\u0442\u0430 \u0432 \u043f\u043e\u0441\u0442\u0430\u0445 \u043a\u0430\u043a\u043e\u0439-\u043b\u0438\u0431\u043e \u0440\u0443\u0431\u0440\u0438\u043a\u0438, \u043d\u0443\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442 \u043a\u043e\u0434\u0430 \u043a \u0444\u0430\u0439\u043b\u0443 functions.php &#8212; \u043b\u0443\u0447\u0448\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043f\u043b\u0430\u0433\u0438\u043d\u0430 Code Snippets \u0438\u043b\u0438 \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0445 \u0435\u043c\u0443.<\/p>\n<p>\u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442 \u043a\u043e\u0434\u0430:<\/p>\n<div class=\"code-block-wrapper\" style=\"position: relative;\">\n        <button class=\"copy-button\" id=\"copy_code_block_69f96a87d21f1\" data-target=\"code_block_69f96a87d21f1\" style=\"\n            position: absolute; \n            top: 10px; \n            right: 10px; \n            background: #0073aa; \n            color: #fff; \n            border: none; \n            padding: 5px 10px; \n            cursor: pointer; \n            font-size: 12px;\n            border-radius: 5px;\">Copy<\/button><\/p>\n<pre><code id=\"code_block_69f96a87d21f1\">\r\nfunction add_custom_category_styles($classes) {\r\n    \/\/ Add custom class for category ID 11111\r\n    if (has_category(11111)) {\r\n        $classes[] = &#039;custom-category-border&#039;;\r\n    }\r\n    \/\/ Add custom class for category ID 22222\r\n    if (has_category(22222)) {\r\n        $classes[] = &#039;custom-category-text-color&#039;;\r\n    }\r\n    return $classes;\r\n}\r\nadd_filter(&#039;post_class&#039;, &#039;add_custom_category_styles&#039;);\r\n<\/code><\/pre>\n<\/p><\/div>\n<p>\u041d\u0435 \u0437\u0430\u0431\u0443\u0434\u044c\u0442\u0435 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c ID \u043d\u0430 \u043d\u0443\u0436\u043d\u044b\u0435 \u0432\u0430\u043c.<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043e\u0441\u0442\u0430\u0451\u0442\u0441\u044f \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0441\u0442\u0438\u043b\u044c \u0432 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u0445.<\/p>\n<div class=\"code-block-wrapper\" style=\"position: relative;\">\n        <button class=\"copy-button\" id=\"copy_code_block_69f96a87d2205\" data-target=\"code_block_69f96a87d2205\" style=\"\n            position: absolute; \n            top: 10px; \n            right: 10px; \n            background: #0073aa; \n            color: #fff; \n            border: none; \n            padding: 5px 10px; \n            cursor: pointer; \n            font-size: 12px;\n            border-radius: 5px;\">Copy<\/button><\/p>\n<pre><code id=\"code_block_69f96a87d2205\">\r\n\/* \u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0440\u0430\u043c\u043a\u0443 \u0432\u043e\u043a\u0440\u0443\u0433 \u043f\u043e\u0441\u0442\u043e\u0432 \u0432 \u0440\u0443\u0431\u0440\u0438\u043a\u0435 ID 11111 *\/\r\n.custom-category-border {\r\n    border: 3px solid #ffcc00 !important; \/* Golden border *\/\r\n    padding: 10px; \/* Optional: add some space inside the border *\/\r\n}\r\n\r\n\/* \u0417\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u0446\u0432\u0435\u0442 \u0442\u0435\u043a\u0441\u0442\u0430 \u043d\u0430 \u0441\u0432\u043e\u0439 \u0432 \u043f\u043e\u0441\u0442\u0430\u0445 \u0440\u0443\u0431\u0440\u0438\u043a\u0438 ID 22222 *\/\r\n.custom-category-text-color {\r\n    color: #0066cc !important; \/* Blue text *\/\r\n}\r\n<\/code><\/pre>\n<\/p><\/div>\n<p>\u0412\u043e\u0442 \u0438 \u0432\u0441\u0451.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u041f\u0440\u043e\u0449\u0435 \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e.<\/p>\n <a class=\"read-more-button\" href=\"https:\/\/newsbee.blog\/wp-tips\/2025\/01\/09\/5656\/\">\u0427\u0438\u0442\u0430\u0442\u044c \u0434\u0430\u043b\u0435\u0435<\/a>","protected":false},"author":1,"featured_media":5657,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[43,41],"tags":[44,39,133,134],"class_list":["post-5656","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-css","category-snippets","tag-css","tag-snippets","tag-133","tag-134"],"_links":{"self":[{"href":"https:\/\/newsbee.blog\/wp-tips\/wp-json\/wp\/v2\/posts\/5656","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/newsbee.blog\/wp-tips\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/newsbee.blog\/wp-tips\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/newsbee.blog\/wp-tips\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/newsbee.blog\/wp-tips\/wp-json\/wp\/v2\/comments?post=5656"}],"version-history":[{"count":1,"href":"https:\/\/newsbee.blog\/wp-tips\/wp-json\/wp\/v2\/posts\/5656\/revisions"}],"predecessor-version":[{"id":5658,"href":"https:\/\/newsbee.blog\/wp-tips\/wp-json\/wp\/v2\/posts\/5656\/revisions\/5658"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/newsbee.blog\/wp-tips\/wp-json\/wp\/v2\/media\/5657"}],"wp:attachment":[{"href":"https:\/\/newsbee.blog\/wp-tips\/wp-json\/wp\/v2\/media?parent=5656"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/newsbee.blog\/wp-tips\/wp-json\/wp\/v2\/categories?post=5656"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/newsbee.blog\/wp-tips\/wp-json\/wp\/v2\/tags?post=5656"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}