{"id":290681,"date":"2018-07-11T18:22:39","date_gmt":"2018-07-11T15:22:39","guid":{"rendered":"https:\/\/ru.wordpress.org\/support\/topic\/%d1%81%d1%82%d1%80%d0%b0%d0%bd%d0%b8%d1%86%d0%b0-%d1%81-%d0%bf%d0%be%d0%b4%d0%ba%d0%b0%d1%82%d0%b5%d0%b3%d0%be%d1%80%d0%b8%d1%8f%d0%bc%d0%b8-wordpress\/"},"modified":"2018-07-11T18:22:39","modified_gmt":"2018-07-11T15:22:39","slug":"%d1%81%d1%82%d1%80%d0%b0%d0%bd%d0%b8%d1%86%d0%b0-%d1%81-%d0%bf%d0%be%d0%b4%d0%ba%d0%b0%d1%82%d0%b5%d0%b3%d0%be%d1%80%d0%b8%d1%8f%d0%bc%d0%b8-wordpress","status":"publish","type":"topic","link":"https:\/\/ru.wordpress.org\/support\/topic\/%d1%81%d1%82%d1%80%d0%b0%d0%bd%d0%b8%d1%86%d0%b0-%d1%81-%d0%bf%d0%be%d0%b4%d0%ba%d0%b0%d1%82%d0%b5%d0%b3%d0%be%d1%80%d0%b8%d1%8f%d0%bc%d0%b8-wordpress\/","title":{"rendered":"\u0421\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u0441 \u043f\u043e\u0434\u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u044f\u043c\u0438 &#8212; WordPress"},"content":{"rendered":"<p>\u0417\u0434\u0440\u0430\u0432\u0441\u0442\u0432\u0443\u0439\u0442\u0435. \u041f\u044b\u0442\u0430\u044e\u0441\u044c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0441 \u043f\u043e\u0434\u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u044f\u043c\u0438. \u0412 loop-categoty.php \u043f\u043e\u043c\u0435\u0441\u0442\u0438\u043b \u043a\u043e\u0434 \u0432\u044b\u0432\u043e\u0434\u0430 \u043f\u043e\u0434\u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0439 \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438:<\/p>\n<pre><code>&lt;?php\n$category = get_queried_object();\n$idofcat = $category-&gt;term_id;\necho $idofcat;\n?&gt;\n \n \n \n&lt;div class=&quot;row&quot;&gt;\n&lt;?php                                                                                          \n    $current_cat = get_query_var(&#039;cat&#039;);\n    global $ancestor;\n    $childcats = get_categories(&#039;child_of=&#039;.$current_cat.&#039;&amp;hide_empty=0&amp;orderby=id&#039;);\n?&gt;\n&lt;?php\n    foreach ($childcats as $childcat) :\n        if (cat_is_ancestor_of($ancestor, $childcat-&gt;cat_ID) == false):\n?&gt;\n&lt;div class=&quot;col-lg-4 col-md-4 category-page&quot;&gt;\n    &lt;aside&gt;\n        &lt;?php\n            if(has_category_thumbnail($childcat-&gt;cat_ID))\n                the_category_thumbnail($childcat-&gt;cat_ID);\n            else{\n        ?&gt;\n        &lt;img style=&quot;width: 100%&quot; src=&quot;&lt;?php bloginfo(&#039;template_url&#039;) ?&gt;\/images\/no-thumbnail.jpg&quot;&gt;\n        &lt;?php } ?&gt;\n        &lt;div class=&quot;content-title&quot;&gt;\n            &lt;div class=&quot;text-center&quot;&gt;\n                &lt;h3&gt;\n                    &lt;a href=&quot;&lt;?php echo get_category_link($childcat-&gt;cat_ID); ?&gt;&quot;&gt;\n                        &lt;?php\n                            echo $childcat-&gt;cat_name;\n                        ?&gt;\n                    &lt;\/a&gt;\n                &lt;\/h3&gt;\n            &lt;\/div&gt;\n        &lt;\/div&gt;\n    &lt;\/aside&gt;\n&lt;\/div&gt;\n \n        \n&lt;?php\n    \n    $postslist = get_posts(&#039;posts_per_page=-1&amp;category=&#039;.$idofcat);\n?&gt; \n    \n    &lt;?php \n        $ancestor = $childcat-&gt;cat_ID;\n    endif;\n        endforeach; \n    ?&gt;\n&lt;\/div&gt;<\/code><\/pre>\n<p>\u0412\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e, \u043d\u043e \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c \u043f\u043e\u0434\u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u044f \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043d\u043e\u0432\u043e\u0441\u0442\u044c(\u0418\u043c\u0435\u043d\u043d\u043e \u043f\u043e\u0434\u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u044f, \u0430 \u043d\u0435 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u0430\u044f \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u044f) \u0438 \u044f \u0445\u043e\u0447\u0443 \u0432\u044b\u0432\u0435\u0441\u0442\u0438 \u0435\u0435, \u0442\u0443\u0442 \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0442\u0441\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b. \u041d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0439 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438 \u0432\u044b\u0432\u043e\u0434\u044f\u0442\u0441\u044f \u043d\u043e\u0432\u043e\u0441\u0442\u0438 \u0435\u0435 \u043f\u043e\u0434\u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438<br \/>\n\u041f\u0440\u0438\u043c\u0435\u0440:<br \/>\nxxxx<br \/>\n-yyyy<br \/>\n-zzzz<br \/>\n&#8212;dddd<br \/>\n&#8212;wwww<\/p>\n<p>wwww &#8212; \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043d\u043e\u0432\u043e\u0441\u0442\u044c \u0438 \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 wwww \u043f\u043e\u0434\u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438 \u0434\u043e\u043b\u0436\u043d\u0430 \u0432\u044b\u043e<\/p>\n","protected":false},"template":"","class_list":["post-290681","topic","type-topic","status-publish","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/ru.wordpress.org\/support\/wp-json\/wp\/v2\/topic\/290681","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\/290681\/revisions"}],"wp:attachment":[{"href":"https:\/\/ru.wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=290681"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}