{"id":220127,"date":"2023-02-05T12:44:00","date_gmt":"2023-02-05T09:44:00","guid":{"rendered":"https:\/\/wordpress.mediadoma.com\/?p=220127"},"modified":"2023-02-06T11:44:25","modified_gmt":"2023-02-06T08:44:25","slug":"kak-dobavit-ssylki-na-sledujushhie-i-predydushhie-soobshhenija-v-wordpress","status":"publish","type":"post","link":"https:\/\/wordpress.mediadoma.com\/ru\/kak-dobavit-ssylki-na-sledujushhie-i-predydushhie-soobshhenija-v-wordpress\/","title":{"rendered":"\u041a\u0430\u043a \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u0441\u044b\u043b\u043a\u0438 \u043d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0438 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0432 WordPress?"},"content":{"rendered":"<p>\u041a\u0430\u0436\u0434\u043e\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0432 <a href=\"https:\/\/wordpress.mediadoma.com\/ru\/kak-dobavit-disqus-esli-kommentarii-zakryty-v-wordpress\/\" title=\"wordpress\">wordpress<\/a> \u0441\u0432\u044f\u0437\u0430\u043d\u043e \u0441 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u043e\u043c, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0435\u0433\u043e \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0435 \u0438 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0441\u043e\u0441\u0435\u0434\u043d\u0438\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f. \u0424\u0443\u043d\u043a\u0446\u0438\u044f wordpress <a href=\"https:\/\/codex.wordpress.org\/Function_Reference\/get_previous_post\" target=\"_blank\" rel=\"noopener nofollow\" class=\"external external_icon\">get_previous_post<\/a> \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u0435\u0442 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0443\u044e \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u044e, \u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f <a href=\"https:\/\/developer.wordpress.org\/reference\/functions\/get_next_post\/\" target=\"_blank\" rel=\"noopener nofollow\" class=\"external external_icon\">get_next_post<\/a> \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u044e.<\/p>\n<p>\u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0432 \u0444\u0430\u0439\u043b \u0448\u0430\u0431\u043b\u043e\u043d\u0430 <a href=\"https:\/\/wordpress.mediadoma.com\/ru\/detskaja-tema-wordpress-vse-chto-vam-nuzhno-znat\/\" title=\"\u0434\u043e\u0447\u0435\u0440\u043d\u0435\u0439 \u0442\u0435\u043c\u044b\">\u0434\u043e\u0447\u0435\u0440\u043d\u0435\u0439 \u0442\u0435\u043c\u044b<\/a> <a href=\"https:\/\/wordpress.mediadoma.com\/ru\/kak-perenapravit-na-odin-post-v-rezultatah-poiska-wordpress\/\" title=\"functions.php\">functions.php<\/a>, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u044d\u0442\u0438 \u0434\u0432\u0435 \u0441\u0441\u044b\u043b\u043a\u0438 \u043d\u0430 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u043d\u0430 \u043e\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f. \u041d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 (is_page) \u044d\u0442\u0438 \u0434\u0432\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u0438 \u043d\u0435 \u0431\u0443\u0434\u0443\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044e is_single(), \u0447\u0442\u043e\u0431\u044b \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0434\u0440\u0443\u0433\u0438\u0435 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 is_page() \u0438\u043b\u0438 is_attachment().<\/p>\n<pre><code>add_filter( 'the_content', 'next_prev_posts' );\n\u00a0\nfunction next_prev_posts($content) {\n\u00a0 $pages = '';\n\u00a0 if (is_single()) { \/\/ only shows on single post, excluding is_page, is_attachment()\n\u00a0 \u00a0 $prev_post = get_previous_post();\n\u00a0 \u00a0 if (!empty( $prev_post )) { \/\/ previous post available\n\u00a0 \u00a0 \u00a0 \u00a0 $pages .= \"Prev Post: &lt;a href='\/archives\/\".$prev_post-&gt;ID.\"'&gt;$prev_post-&gt;post_title&lt;\/a&gt;\";\n\u00a0 \u00a0 } \u00a0\n\u00a0 \u00a0 $next_post = get_next_post();\n\u00a0 \u00a0 if (!empty( $next_post )) { \/\/ next item available\n\u00a0 \u00a0 \u00a0 \u00a0 $pages .= \" | Next Post: &lt;a href='\/archives\/\".$next_post-&gt;ID.\"'&gt;$next_post-&gt;post_title&lt;\/a&gt;\";\n\u00a0 \u00a0 }\n\u00a0 }\n\u00a0 return $content. $pages; \/\/ put the navigation at the end of the post content\n}<\/code><\/pre>\n<p>\u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u0432\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0442\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 <a href=\"https:\/\/helloacm.com\/how-to-unit-test-url-connectivity-via-phpunit\/\" target=\"_blank\" rel=\"noopener nofollow\" class=\"external external_icon\">URL<\/a> -\u0430\u0434\u0440\u0435\u0441\u0430 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 WordPress, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0441\u043e\u0437\u0434\u0430\u043d\u044b \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 3 \u043c\u0435\u0442\u043e\u0434\u043e\u0432.<\/p>\n<ul>\n<li>\u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e<\/li>\n<li>\u042f \u0411\u042b<\/li>\n<li>\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a \u043f\u043e\u0441\u0442\u0430<\/li>\n<\/ul>\n<p>\u041e\u0447\u0438\u0441\u0442\u0438\u0442\u0435 <a href=\"https:\/\/wordpress.mediadoma.com\/ru\/kak-kjeshirovat-token-wechat-cherez-php\/\" title=\"\u043a\u0435\u0448\">\u043a\u0435\u0448<\/a>, \u0438 \u0432\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u044d\u0442\u0438 \u0434\u0432\u0435 \u0441\u0441\u044b\u043b\u043a\u0438 \u043f\u043e\u0441\u043b\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f. \u0412\u044b \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c <a href=\"https:\/\/wordpress.mediadoma.com\/ru\/kak-ispolzovat-klavishi-so-strelkami-na-klaviature-dlja-navigacii-po-soobshhenijam-wordpress\/\" title=\"\u043a\u043b\u0430\u0432\u0438\u0448\u0438 \u0441\u043e \u0441\u0442\u0440\u0435\u043b\u043a\u0430\u043c\u0438 \u043d\u0430 \u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u0435\">\u043a\u043b\u0430\u0432\u0438\u0448\u0438 \u0441\u043e \u0441\u0442\u0440\u0435\u043b\u043a\u0430\u043c\u0438 \u043d\u0430 \u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u0435<\/a> \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0430 \u043a \u0441\u043e\u0441\u0435\u0434\u043d\u0438\u043c \u0437\u0430\u043f\u0438\u0441\u044f\u043c.<\/p>\n<p><div id=\"PostUnique_PostSource\" style=\"padding-top: 50px\">\u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a \u0437\u0430\u043f\u0438\u0441\u0438:  <a target=\"_blank\" rel=\"noopener nofollow\" href=\"\/\/helloacm.com\" class=\"external external_icon\">helloacm.com<\/a><\/div><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u041a\u0430\u043a \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u0441\u044b\u043b\u043a\u0438 \u043d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0438 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0435 \u0437\u0430\u043f\u0438\u0441\u0438 \u0432 WordPress?<\/p>\n","protected":false},"author":1,"featured_media":223973,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":"","_wp_rev_ctl_limit":""},"categories":[809,870,900,921,726,618,850],"tags":[1171],"class_list":["post-220127","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-php-ru","category-wordpress-ru","category-kod-2","category-drugoj","category-rozrobnyk-ru","category-rukovodstvo-dlja-nachinajushhih","category-uchebniki-ru","tag-affiai-ru"],"_links":{"self":[{"href":"https:\/\/wordpress.mediadoma.com\/ru\/wp-json\/wp\/v2\/posts\/220127","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.mediadoma.com\/ru\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wordpress.mediadoma.com\/ru\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.mediadoma.com\/ru\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.mediadoma.com\/ru\/wp-json\/wp\/v2\/comments?post=220127"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.mediadoma.com\/ru\/wp-json\/wp\/v2\/posts\/220127\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/wordpress.mediadoma.com\/ru\/wp-json\/wp\/v2\/media\/223973"}],"wp:attachment":[{"href":"https:\/\/wordpress.mediadoma.com\/ru\/wp-json\/wp\/v2\/media?parent=220127"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wordpress.mediadoma.com\/ru\/wp-json\/wp\/v2\/categories?post=220127"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wordpress.mediadoma.com\/ru\/wp-json\/wp\/v2\/tags?post=220127"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}