{"id":4831,"date":"2024-10-20T19:59:57","date_gmt":"2024-10-20T19:59:57","guid":{"rendered":"https:\/\/forestgreen-jay-845795.hostingersite.com\/?p=4831"},"modified":"2024-12-03T17:39:38","modified_gmt":"2024-12-03T17:39:38","slug":"%d0%b4%d0%be%d0%bf%d0%be%d0%bb%d0%bd%d0%b8%d1%82%d0%b5%d0%bb%d1%8c%d0%bd%d1%8b%d0%b9-%d0%ba%d0%be%d0%bd%d1%82%d0%b5%d0%bd%d1%82-%d0%b2%d0%bd%d1%83%d1%82%d1%80%d0%b8-%d0%b7%d0%b0%d0%bc%d0%b5%d1%82","status":"publish","type":"post","link":"https:\/\/newsbee.blog\/wp-tips\/2024\/10\/20\/4831\/","title":{"rendered":"\u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u043d\u0442\u0435\u043d\u0442 \u0432\u043d\u0443\u0442\u0440\u0438 \u0437\u0430\u043c\u0435\u0442\u043a\u0438"},"content":{"rendered":"<p>\u0415\u0441\u043b\u0438 \u0440\u0435\u043a\u043b\u0430\u043c\u043e\u0434\u0430\u0442\u0435\u043b\u0438 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e\u0442 \u0440\u0430\u0437\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u0441\u0432\u043e\u0438 \u0431\u0430\u043d\u043d\u0435\u0440\u044b \u0432 \u0431\u043b\u043e\u0433\u0435, \u0435\u0441\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432: \u0440\u0430\u0437\u043c\u0435\u0449\u0430\u0442\u044c \u0438\u0445 \u043f\u0435\u0440\u0435\u0434 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u043c \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u043e\u043c, \u043f\u043e\u0441\u043b\u0435 \u0438\u043b\u0438 \u0432\u043d\u0443\u0442\u0440\u0438 \u0437\u0430\u043f\u0438\u0441\u0438. \u041f\u043e\u043c\u0438\u043c\u043e \u0434\u0440\u0443\u0433\u0438\u0445 \u043c\u0435\u0441\u0442 \u0441\u0430\u0439\u0442\u0430, \u043a\u043e\u043d\u0435\u0447\u043d\u043e.<\/p>\n<p>\u041f\u0435\u0440\u0435\u0434 \u0438 \u043f\u043e\u0441\u043b\u0435 &#8212; \u043f\u0440\u043e\u0441\u0442\u043e: \u043c\u043e\u0436\u043d\u043e \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u043b\u0430\u0433\u0438\u043d\u043e\u043c Head, Footer and Post Injections.<\/p>\n<p>\u0410 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u044d\u0442\u043e\u0442 \u0441\u043d\u0438\u043f\u043f\u0435\u0442 \u043a functions.php \u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0440\u0430\u0437\u043c\u0435\u0449\u0430\u0442\u044c \u0440\u0435\u043a\u043b\u0430\u043c\u0443 \u0438\u043b\u0438 \u0434\u0440\u0443\u0433\u043e\u0439 \u0441\u0432\u043e\u0439 <strong>\u043a\u043e\u043d\u0442\u0435\u043d\u0442 \u043f\u043e\u0441\u043b\u0435 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u043f\u0430\u0440\u0430\u0433\u0440\u0430\u0444\u0430<\/strong> \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0430. \u0422\u0430\u043a\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b \u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u0442 \u043d\u0430 \u0441\u0430\u0439\u0442\u0435 <a href=\"https:\/\/www.rabotnikitv.com\" target=\"_blank\" rel=\"noopener\">\u0420\u0430\u0431\u043e\u0442\u043d\u0438\u043a\u0438 \u0422\u0412<\/a>, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440.<\/p>\n<div class=\"code-block-wrapper\" style=\"position: relative;\">\n        <button class=\"copy-button\" id=\"copy_code_block_69f97dbb4a233\" data-target=\"code_block_69f97dbb4a233\" 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_69f97dbb4a233\">\r\nfunction insert_after_first_paragraph($content) {\r\n    \/\/ Only proceed if we&#039;re on a single post\r\n    if (!is_single()) {\r\n        return $content;\r\n    }\r\n    \r\n    \/\/ The content you want to insert\r\n    $insertion = &#039;&lt;div class=&quot;custom-content&quot;&gt;\r\n        \u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u0432\u043e\u0439 \u043a\u043e\u043d\u0442\u0435\u043d\u0442 \u0437\u0434\u0435\u0441\u044c\r\n    &lt;\/div&gt;&#039;;\r\n    \r\n    \/\/ Split content into paragraphs\r\n    $paragraphs = explode(&#039;&lt;\/p&gt;&#039;, $content);\r\n    \r\n    \/\/ Check if there&#039;s at least one paragraph\r\n    if (count($paragraphs) &gt; 0) {\r\n        \/\/ Add the insertion after the first paragraph\r\n        \/\/ Make sure to add the closing &lt;\/p&gt; tag back\r\n        $paragraphs[0] .= &#039;&lt;\/p&gt;&#039; . $insertion;\r\n        \r\n        \/\/ Reconstruct the content\r\n        $content = &#039;&#039;;\r\n        foreach ($paragraphs as $index =&gt; $paragraph) {\r\n            \/\/ Don&#039;t add &lt;\/p&gt; to the last element if it doesn&#039;t originally have it\r\n            if ($index != count($paragraphs) - 1) {\r\n                $content .= $paragraph . &#039;&lt;\/p&gt;&#039;;\r\n            } else {\r\n                $content .= $paragraph;\r\n            }\r\n        }\r\n    }\r\n    \r\n    return $content;\r\n}\r\n\r\n\/\/ Hook the function to the content filter\r\nadd_filter(&#039;the_content&#039;, &#039;insert_after_first_paragraph&#039;);\r\n<\/code><\/pre>\n<\/p><\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u041a\u0430\u043a \u0440\u0430\u0437\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u0440\u0435\u043a\u043b\u0430\u043c\u0443 \u0438\u043b\u0438 \u0434\u0440\u0443\u0433\u043e\u0439 \u0441\u0432\u043e\u0439 \u043a\u043e\u043d\u0442\u0435\u043d\u0442 \u0432 \u0437\u0430\u043c\u0435\u0442\u043a\u0435 \u043f\u043e\u0441\u043b\u0435 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u043f\u0430\u0440\u0430\u0433\u0440\u0430\u0444\u0430 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0430?<\/p>\n <a class=\"read-more-button\" href=\"https:\/\/newsbee.blog\/wp-tips\/2024\/10\/20\/4831\/\">\u0427\u0438\u0442\u0430\u0442\u044c \u0434\u0430\u043b\u0435\u0435<\/a>","protected":false},"author":1,"featured_media":4819,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[41],"tags":[80,39,94,49],"class_list":["post-4831","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-snippets","tag-functions-php","tag-snippets","tag-94","tag-49"],"_links":{"self":[{"href":"https:\/\/newsbee.blog\/wp-tips\/wp-json\/wp\/v2\/posts\/4831","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=4831"}],"version-history":[{"count":5,"href":"https:\/\/newsbee.blog\/wp-tips\/wp-json\/wp\/v2\/posts\/4831\/revisions"}],"predecessor-version":[{"id":5144,"href":"https:\/\/newsbee.blog\/wp-tips\/wp-json\/wp\/v2\/posts\/4831\/revisions\/5144"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/newsbee.blog\/wp-tips\/wp-json\/wp\/v2\/media\/4819"}],"wp:attachment":[{"href":"https:\/\/newsbee.blog\/wp-tips\/wp-json\/wp\/v2\/media?parent=4831"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/newsbee.blog\/wp-tips\/wp-json\/wp\/v2\/categories?post=4831"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/newsbee.blog\/wp-tips\/wp-json\/wp\/v2\/tags?post=4831"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}