{"id":27457,"date":"2010-11-09T23:49:23","date_gmt":"2010-11-09T23:49:23","guid":{"rendered":"https:\/\/ru.wordpress.org\/support\/2010\/11\/09\/%d0%9d%d0%b5-%d1%80%d0%b0%d0%b1%d0%be%d1%82%d0%b0%d0%b5%d1%82-%d0%bf%d0%be%d1%81%d1%82%d1%80%d0%b0%d0%bd%d0%b8%d1%87%d0%bd%d0%b0%d1%8f-%d0%bd%d0%b0%d0%b2%d0%b8%d0%b3%d0%b0%d1%86%d0%b8%d1%8f\/"},"modified":"2010-11-09T23:49:23","modified_gmt":"2010-11-09T23:49:23","slug":"%d0%9d%d0%b5-%d1%80%d0%b0%d0%b1%d0%be%d1%82%d0%b0%d0%b5%d1%82-%d0%bf%d0%be%d1%81%d1%82%d1%80%d0%b0%d0%bd%d0%b8%d1%87%d0%bd%d0%b0%d1%8f-%d0%bd%d0%b0%d0%b2%d0%b8%d0%b3%d0%b0%d1%86%d0%b8%d1%8f","status":"closed","type":"topic","link":"https:\/\/ru.wordpress.org\/support\/topic\/%d0%9d%d0%b5-%d1%80%d0%b0%d0%b1%d0%be%d1%82%d0%b0%d0%b5%d1%82-%d0%bf%d0%be%d1%81%d1%82%d1%80%d0%b0%d0%bd%d0%b8%d1%87%d0%bd%d0%b0%d1%8f-%d0%bd%d0%b0%d0%b2%d0%b8%d0%b3%d0%b0%d1%86%d0%b8%d1%8f\/","title":{"rendered":"\u041d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043f\u043e\u0441\u0442\u0440\u0430\u043d\u0438\u0447\u043d\u0430\u044f \u043d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u044f"},"content":{"rendered":"<p>\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043d\u0435 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u0442\u0441\u044f \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u043e \u043b\u044e\u0431\u0430\u044f \u043d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u044f, \u043a\u0430\u043a\u043e\u0439 \u0431\u044b \u043f\u043b\u0430\u0433\u0438\u043d \u043d\u0435 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u043b. \u041d\u043e \u043d\u0430 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0443 \u043c\u0435\u043d\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435:<\/p>\n<p>\u0412 pagenavi.php <\/p>\n<pre><code>&lt;div class=&quot;navigation&quot;&gt;&lt;?php\nglobal $wp_query;\n$max_page = $wp_query-&gt;max_num_pages;\n$nump=10;\n\nif($max_page!=1){\n    $paged = intval(get_query_var(&#039;paged&#039;));\n    if(empty($paged) || $paged == 0) $paged = 1;\n\n    echo &#039;&lt;p class=&quot;pagenavi&quot;&gt;&#039;;\n\n    if($paged!=1) echo &#039;&lt;a href=&quot;&#039;.get_pagenum_link(1).&#039;&quot;&gt;\u041f\u0435\u0440\u0432\u0430\u044f&lt;\/a&gt; &#039;;\n        else echo &#039;&lt;span class=&quot;current&quot;&gt;\u041f\u0435\u0440\u0432\u0430\u044f&lt;\/span&gt; &#039;;\n\n    if($paged-$nump&gt;1) $start=$paged-$nump; else $start=2;\n    if($paged+$nump&lt;$max_page) $end=$paged+$nump; else $end=$max_page-1;\n\n    if($start&gt;2) echo &quot;... &quot;;\n\n    for ($i=$start;$i&lt;=$end;$i++)\n     {\n     if($paged!=$i) echo &#039;&lt;a href=&quot;&#039;.get_pagenum_link($i).&#039;&quot;&gt;&#039;.$i.&#039;&lt;\/a&gt; &#039;;\n        else echo &#039;&lt;span class=&quot;current&quot;&gt;&#039;.$i.&#039;&lt;\/span&gt; &#039;;\n     }\n\n    if($end&lt;$max_page-1) echo &quot;... &quot;;\n\n    if($paged!=$max_page) echo &#039;&lt;a href=&quot;&#039;.get_pagenum_link($max_page).&#039;&quot;&gt;\u041f\u043e\u0441\u043b\u0435\u0434\u043d\u044f\u044f&lt;\/a&gt;&#039;;\n        else echo &#039;&lt;span class=&quot;current&quot;&gt;\u041f\u043e\u0441\u043b\u0435\u0434\u043d\u044f\u044f&lt;\/span&gt; &#039;;\n    echo &#039;&lt;\/p&gt;&#039;    ;\n    }\n?&gt;&lt;\/div&gt;<\/code><\/pre>\n<p>\u0412 (style.css)- \u043f\u0440\u043e\u043f\u0438\u0441\u0430\u043b \u0432\u0441\u0451 \u0447\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0438 <\/p>\n<p>\u0432\u0441\u0442\u0430\u0432\u0438\u043b \u0432 (index.php)\u0432\u043e\u0442 \u044d\u0442\u043e`&lt;div<br \/>\nclass=&#187;navigation&#187;&gt;<br \/>\n    &lt;?php include(TEMPLATEPATH.&#187;\/pagenavi.php&#187;); ?&gt;<br \/>\n&lt;\/div&gt;`<\/p>\n<p>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442: \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u043b\u043e\u0432\u043e &#171;\u043f\u0435\u0440\u0432\u0430\u044f&#187; \u0438 \u0440\u044f\u0434\u044b\u0448\u043a\u043e\u043c \u0441\u043b\u043e\u0432\u043e &#171;\u043f\u043e\u0441\u043b\u0435\u0434\u043d\u044f\u044f&#187; \u0431\u0435\u0437 \u0432\u0441\u044f\u043a\u0438\u0445 \u0446\u0438\u0444\u0440. \u041f\u043e\u043c\u043e\u0433\u0438\u0442\u0435 \u043f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430 \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u0432 \u0447\u0451\u043c \u0441\u043e\u0431\u0430\u043a\u0430 \u043f\u043e\u0440\u044b\u043b\u0430\u0441\u044c. \u0421\u0442\u0430\u0442\u0435\u0439 \u043d\u0430 \u0441\u0430\u0439\u0442\u0435 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0432\u0435\u0434\u044c<\/p>\n","protected":false},"template":"","class_list":["post-27457","topic","type-topic","status-closed","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/ru.wordpress.org\/support\/wp-json\/wp\/v2\/topic\/27457","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ru.wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/ru.wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/ru.wordpress.org\/support\/wp-json\/wp\/v2\/topic\/27457\/revisions"}],"wp:attachment":[{"href":"https:\/\/ru.wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=27457"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}