{"id":216608,"date":"2016-07-28T09:39:40","date_gmt":"2016-07-28T09:39:40","guid":{"rendered":""},"modified":"2016-07-31T04:28:58","modified_gmt":"2016-07-31T04:28:58","slug":"%d1%84%d0%b8%d0%bb%d1%8c%d1%82%d1%80-%d0%b7%d0%b0%d0%bf%d0%b8%d1%81%d0%b5%d0%b9-%d0%bf%d0%be-%d0%ba%d0%b0%d1%82%d0%b5%d0%b3%d0%be%d1%80%d0%b8%d1%8f%d0%bc-%d0%b8-%d0%ba%d0%b0%d1%81%d1%82%d0%be%d0%bc","status":"publish","type":"topic","link":"https:\/\/ru.wordpress.org\/support\/topic\/%d1%84%d0%b8%d0%bb%d1%8c%d1%82%d1%80-%d0%b7%d0%b0%d0%bf%d0%b8%d1%81%d0%b5%d0%b9-%d0%bf%d0%be-%d0%ba%d0%b0%d1%82%d0%b5%d0%b3%d0%be%d1%80%d0%b8%d1%8f%d0%bc-%d0%b8-%d0%ba%d0%b0%d1%81%d1%82%d0%be%d0%bc\/","title":{"rendered":"\u0444\u0438\u043b\u044c\u0442\u0440 \u0437\u0430\u043f\u0438\u0441\u0435\u0439 \u043f\u043e \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u044f\u043c \u0438 \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u043c \u043f\u043e\u043b\u044f\u043c"},"content":{"rendered":"<p>\u0412\u0441\u0435\u043c \u0434\u043e\u0431\u0440\u044b\u0439 \u0434\u0435\u043d\u044c,  \u0432\u043e\u0442 \u043c\u0443\u0447\u0430\u044e\u0441\u044c \u043d\u0430\u0434 \u0444\u0438\u043b\u044c\u0442\u0440\u043e\u043c \u0434\u043b\u044f \u0437\u0430\u043f\u0438\u0441\u0435\u0439, \u0444\u0438\u043b\u044c\u0442\u0440 \u043f\u043e \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u044f\u043c \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043a\u043e\u0435 \u043a\u0430\u043a, \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u043e\u0442 \u043f\u043e custom field  \u043d\u0438\u043a\u0430\u043a, \u043c\u043e\u0436\u0435\u0442 \u043a\u0442\u043e \u043f\u043e\u0434\u0441\u043a\u0430\u0436\u0435\u0442 <\/p>\n<pre><code>&lt;?php\n\/**\n * The template for displaying all pages.\n *\n * This is the template that displays all pages by default.\n * Please note that this is the WordPress construct of pages\n * and that other &#039;pages&#039; on your WordPress site will use a\n * different template.\n *\n\n *\/\n\n global $wp_query;\n$modifications = array();\nif( !empty( $_GET[&#039;cat&#039;] ) ) {\n\t$modifications[&#039;meta_query&#039;][] = array(\n\t\t&#039;key&#039; =&gt; &#039;cat&#039;,\n\t\t&#039;value&#039; =&gt; $_GET[&#039;cat&#039;],\n\t\t&#039;compare&#039; =&gt; &#039;!=&#039;\n\t);\n}\n\nget_header(); ?&gt;\n\n\t&lt;div id=&quot;primary-mono&quot; class=&quot;content-area &lt;?php do_action(&#039;tribal_primary-width&#039;) ?&gt; page&quot;&gt;\n\t\t&lt;main id=&quot;main&quot; class=&quot;site-main&quot; role=&quot;main&quot;&gt;\n\t\t\t&lt;form action=&quot;&lt;?php echo get_permalink(251); ?&gt;&quot; method=&quot;get&quot; class=&quot;post-filters&quot;&gt;\n\n\t\t\t\t&lt;select id=&quot;selectBox&quot; name=&quot;work_type&quot;&gt;\n\t\t\t\t\t&lt;option value=&#039;&#039;&gt;&lt;?php _e(&#039;work type&#039;, &#039;tribal&#039;) ?&gt;&lt;\/option&gt;\n\t\t\t\t\t&lt;option value=&#039;10&#039; &lt;?php if($_GET[&#039;work_type&#039;] == &#039;10&#039;){echo &#039;selected&#039;;} ?&gt;&gt;&lt;?php _e(&#039;Construction&#039;, &#039;tribal&#039;) ?&gt;&lt;\/option&gt;\n\t\t\t\t\t&lt;option value=&#039;11&#039; &lt;?php if($_GET[&#039;work_type&#039;] == &#039;11&#039;){echo &#039;selected&#039;;} ?&gt;&gt;&lt;?php _e(&#039;Design&#039;, &#039;tribal&#039;) ?&gt;&lt;\/option&gt;\n\t\t\t\t\t&lt;option value=&#039;13&#039; &lt;?php if($_GET[&#039;work_type&#039;] == &#039;13&#039;){echo &#039;selected&#039;;} ?&gt;&gt;&lt;?php _e(&#039;Designing&#039;, &#039;tribal&#039;) ?&gt;&lt;\/option&gt;\n\t\t\t\t\t&lt;option value=&#039;9&#039; &lt;?php if($_GET[&#039;work_type&#039;] == &#039;9&#039;){echo &#039;selected&#039;;} ?&gt;&gt;&lt;?php _e(&#039;Portfolio&#039;, &#039;tribal&#039;) ?&gt;&lt;\/option&gt;\n\t\t\t\t&lt;\/select&gt;\n\t\t\t\t&lt;select id=&quot;select_status&quot; name=&quot;status_type&quot;&gt;\n\t\t\t\t\t&lt;option value=&#039;&#039;&gt;&lt;?php _e(&#039;status&#039;, &#039;tribal&#039;) ?&gt;&lt;\/option&gt;\n\t\t\t\t\t&lt;option value=&#039;build&#039; &lt;?php if($_GET[&#039;status_type&#039;] == &#039;build&#039;){echo &#039;selected&#039;;} ?&gt;&gt;&lt;?php _e(&#039;build&#039;, &#039;tribal&#039;) ?&gt;&lt;\/option&gt;\n\t\t\t\t\t&lt;option value=&#039;construction_completed&#039; &lt;?php if($_GET[&#039;status_type&#039;] == &#039;construction_completed&#039;){echo &#039;selected&#039;;} ?&gt;&gt;&lt;?php _e(&#039;construction completed&#039;, &#039;tribal&#039;) ?&gt;&lt;\/option&gt;\n\t\t\t\t&lt;\/select&gt;\n\t\t\t\t&lt;select id=&quot;select_location&quot; name=&quot;location_type&quot;&gt;\n\t\t\t\t\t&lt;option value=&#039;&#039;&gt;&lt;?php _e(&#039;location&#039;, &#039;tribal&#039;) ?&gt;&lt;\/option&gt;\n\t\t\t\t\t&lt;option value=&#039;&#039;&gt;&lt;\/option&gt;\n\t\t\t\t\t&lt;option value=&#039;&#039;&gt;&lt;\/option&gt;\n\t\t\t\t\t&lt;option value=&#039;&#039;&gt;&lt;\/option&gt;\n\t\t\t\t&lt;\/select&gt;\n\t\t\t\t&lt;select id=&quot;select_date&quot; name=&quot;date_type&quot;&gt;\n\t\t\t\t\t&lt;option value=&#039;&#039;&gt;&lt;?php _e(&#039;date&#039;, &#039;tribal&#039;) ?&gt;&lt;\/option&gt;\n\t\t\t\t\t&lt;option value=&#039;&#039;&gt;&lt;\/option&gt;\n\t\t\t\t\t&lt;option value=&#039;&#039;&gt;&lt;\/option&gt;\n\t\t\t\t\t&lt;option value=&#039;&#039;&gt;&lt;\/option&gt;\n\t\t\t\t&lt;\/select&gt;\n\t\t\t\t&lt;input type=&quot;submit&quot; class=&quot;&quot; \/&gt;\n\t\t\t\t\t&lt;div class=&quot;buttons&quot;&gt;&lt;button class=&quot;grid&quot;&gt;&lt;p class=&quot;icon1&quot;&gt;&lt;\/p&gt;&lt;?php _e(&#039;Grid&#039;, &#039;tribal&#039;) ?&gt;&lt;\/button&gt;\n\t\t\t&lt;button class=&quot;list&quot;&gt;&lt;p class=&quot;icon2&quot;&gt;&lt;\/p&gt;&lt;?php _e(&#039;List&#039;, &#039;tribal&#039;) ?&gt;&lt;\/button&gt;\n\n\t\t&lt;\/div&gt;\n\t\t&lt;\/form&gt;\n\t\t&lt;div id=&quot;container&quot;&gt;\n\n\t\t &lt;div class=&quot;portfolio-list&quot;&gt;\n                &lt;ul&gt;\n                    &lt;?php\n\t\t\t\t\t\tif(empty($_GET[&#039;work_type&#039;])){\n\t\t\t\t\t\t\t$cats = &#039;10,11,13,9&#039;;\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$cats = $_GET[&#039;work_type&#039;];\n\t\t\t\t\t\t}\n                        $paged = ( get_query_var( &#039;paged&#039; ) ) ? get_query_var( &#039;paged&#039; ) : 1;\n                        $temp = $wp_query;\n                        $wp_query= null;\n                        $args = array(\n                            &#039;paged&#039; =&gt; $paged,\n                            &#039;post_type&#039; =&gt; &#039;post&#039;,\n                            &#039;posts_per_page&#039; =&gt; &#039;18&#039;,\n\t\t\t\t\t\t\t&#039;cat&#039; =&gt; $cats,\n                            &#039;orderby&#039; =&gt; &#039;date&#039;,\n                            &#039;order&#039; =&gt; &#039;DESC&#039;,\n\n\t\t\t\t\t\t\t);\n\n                        $wp_query = new WP_Query($args);\n\t\t\t\t\t\tif($wp_query-&gt;have_posts()):\n                        while($wp_query-&gt;have_posts()) :\n                            $wp_query-&gt;the_post();\n                    ?&gt;\n\n                    &lt;li&gt;\n\t\t\t\t\t\t&lt;div class=&quot;item&quot;&gt;\n                            &lt;a href=&quot;&lt;?php the_permalink(); ?&gt;&quot;&gt;&lt;?php the_post_thumbnail(); ?&gt;&lt;p&gt;&lt;?php the_title(); ?&gt;&lt;\/p&gt;&lt;\/a&gt;\n\n                        &lt;\/div&gt;\n                    &lt;\/li&gt;\n                    &lt;?php endwhile; ?&gt;\n                    &lt;?php endif; ?&gt;\n                &lt;\/ul&gt;\n\t\t\t\t&lt;?php\n                echo &#039;&lt;div class=&quot;pagination&quot;&gt;&#039;;\n                \t\tif(function_exists(&#039;wp_pagenavi&#039;)) { wp_pagenavi(array(&#039;query&#039; =&gt; $wp_query)); }\n                \t\t$wp_query = null; $wp_query = $temp;\n                echo &#039;&lt;\/div&gt;&#039;;\n                wp_reset_query();\n            ?&gt;\n                &lt;div class=&quot;clearfix&quot;&gt;&lt;\/div&gt;\n            &lt;\/div&gt;\n\n\t\t&lt;\/main&gt;&lt;!-- #main --&gt;\n\t&lt;\/div&gt;&lt;!-- #primary --&gt;\n\n&lt;?php get_sidebar(); ?&gt;\n&lt;?php get_footer(); ?&gt;<\/code><\/pre>\n","protected":false},"template":"","class_list":["post-216608","topic","type-topic","status-publish","hentry","topic-tag-category","topic-tag-custom-fields","topic-tag-filter"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/ru.wordpress.org\/support\/wp-json\/wp\/v2\/topic\/216608","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\/216608\/revisions"}],"wp:attachment":[{"href":"https:\/\/ru.wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=216608"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}