{"id":161598,"date":"2015-02-11T19:46:54","date_gmt":"2015-02-11T19:46:54","guid":{"rendered":"https:\/\/ru.wordpress.org\/support\/2015\/02\/11\/singlephp-%d0%b4%d0%bb%d1%8f-%d0%bf%d1%80%d0%be%d0%b8%d0%b7%d0%b2%d0%be%d0%bb%d1%8c%d0%bd%d1%8b%d1%85-%d1%82%d0%b8%d0%bf%d0%be%d0%b2-%d0%b7%d0%b0%d0%bf%d0%b8%d1%81%d0%b5%d0%b9\/"},"modified":"2015-02-11T19:46:54","modified_gmt":"2015-02-11T19:46:54","slug":"singlephp-%d0%b4%d0%bb%d1%8f-%d0%bf%d1%80%d0%be%d0%b8%d0%b7%d0%b2%d0%be%d0%bb%d1%8c%d0%bd%d1%8b%d1%85-%d1%82%d0%b8%d0%bf%d0%be%d0%b2-%d0%b7%d0%b0%d0%bf%d0%b8%d1%81%d0%b5%d0%b9","status":"closed","type":"topic","link":"https:\/\/ru.wordpress.org\/support\/topic\/singlephp-%d0%b4%d0%bb%d1%8f-%d0%bf%d1%80%d0%be%d0%b8%d0%b7%d0%b2%d0%be%d0%bb%d1%8c%d0%bd%d1%8b%d1%85-%d1%82%d0%b8%d0%bf%d0%be%d0%b2-%d0%b7%d0%b0%d0%bf%d0%b8%d1%81%d0%b5%d0%b9\/","title":{"rendered":"Single.php \u0434\u043b\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u044b\u0445 \u0442\u0438\u043f\u043e\u0432 \u0437\u0430\u043f\u0438\u0441\u0435\u0439"},"content":{"rendered":"<p>\u0414\u043e\u0431\u0440\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0441\u0443\u0442\u043e\u043a!<\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u043d\u044b \u0442\u0438\u043f\u044b \u0437\u0430\u043f\u0438\u0441\u0435\u0439 \u043f\u043e \u0448\u0430\u0431\u043b\u043e\u043d\u0443:<\/p>\n<pre><code>\/\/ register a custom post type called &#039;catalog_restoranov&#039;\nfunction register_post_type_catalog_restoranov() {\n    $labels = array(\n        &#039;name&#039; =&gt; __( &#039;\u0420\u0435\u0441\u0442\u043e\u0440\u0430\u043d\u044b&#039; ),\n        &#039;singular_name&#039; =&gt; __( &#039;\u0420\u0435\u0441\u0442\u043e\u0440\u0430\u043d&#039; ),\n        &#039;add_new&#039; =&gt; __( &#039;\u041d\u043e\u0432\u044b\u0439 \u0440\u0435\u0441\u0442\u043e\u0440\u0430\u043d&#039; ),\n        &#039;add_new_item&#039; =&gt; __( &#039;\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0440\u0435\u0441\u0442\u043e\u0440\u0430\u043d&#039; ),\n        &#039;edit_item&#039; =&gt; __( &#039;\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0440\u0435\u0441\u0442\u043e\u0440\u0430\u043d&#039; ),\n        &#039;new_item&#039; =&gt; __( &#039;\u041d\u043e\u0432\u044b\u0439 \u0440\u0435\u0441\u0442\u043e\u0440\u0430\u043d&#039; ),\n        &#039;view_item&#039; =&gt; __( &#039;\u041f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0440\u0435\u0441\u0442\u043e\u0440\u0430\u043d&#039; ),\n        &#039;search_items&#039; =&gt; __( &#039;\u0418\u0441\u043a\u0430\u0442\u044c \u0440\u0435\u0441\u0442\u043e\u0440\u0430\u043d&#039; ),\n        &#039;not_found&#039; =&gt;  __( &#039;\u0420\u0435\u0441\u0442\u043e\u0440\u0430\u043d\u044b \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u044b&#039; ),\n        &#039;not_found_in_trash&#039; =&gt; __( &#039;\u041d\u0435\u0442 \u0440\u0435\u0441\u0442\u043e\u0440\u0430\u043d\u043e\u0432 \u0432 \u0430\u0440\u0445\u0438\u0432\u0435&#039; ),\n    );\n    $args = array(\n        &#039;labels&#039; =&gt; $labels,\n        &#039;has_archive&#039; =&gt; true,\n        &#039;public&#039; =&gt; true,\n        &#039;hierarchical&#039; =&gt; false,\n        &#039;supports&#039; =&gt; array(\n            &#039;title&#039;,\n            &#039;editor&#039;,\n            &#039;excerpt&#039;,\n            &#039;custom-fields&#039;,\n            &#039;thumbnail&#039;,\n            &#039;page-attributes&#039;\n        ),\n        &#039;taxonomies&#039; =&gt; array( &#039;catalog_restoranov&#039;, &#039;catalog_restoranov&#039;),\n    );\n    register_post_type( &#039;catalog_restoranov&#039;, $args );\n};\nadd_action( &#039;init&#039;, &#039;register_post_type_catalog_restoranov&#039; );<\/code><\/pre>\n<p>\u042d\u0442\u0438 \u0437\u0430\u043f\u0438\u0441\u0438 \u0432\u044b\u0432\u0435\u0434\u0435\u043d\u044b \u043d\u0430 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435. \u041f\u0440\u0438 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0435 \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e \u0440\u0435\u0441\u0442\u043e\u0440\u0430\u043d\u0430 \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0433\u043b\u0430\u0432\u043d\u0430\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u0430 \u043d\u0435 single.php. \u0421\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0435\u0441\u043b\u0438 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0444\u0430\u0439\u043b single-catalog_restoranov.php \u0442\u043e\u0436\u0435 \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442.<br \/>\nhttp:\/\/surano.bget.ru\/restoranyi\/katalog-zavedeniy<br \/>\n\u0422\u0430\u043c \u0441\u0435\u0439\u0447\u0430\u0441 \u043e\u0434\u043d\u0430 \u0437\u0430\u043f\u0438\u0441\u044c \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u0430<\/p>\n<p>\u041f\u043e\u043c\u043e\u0433\u0438\u0442\u0435 \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f. \u0415\u0441\u043b\u0438 \u0447\u0435\u0433\u043e \u0442\u043e \u043d\u0435 \u0445\u0432\u0430\u0442\u0430\u0435\u0442 \u0434\u043b\u044f \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0438 \u0441\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0439\u0442\u0435 &#8212; \u0434\u043e\u043f\u0438\u0448\u0443.<\/p>\n","protected":false},"template":"","class_list":["post-161598","topic","type-topic","status-closed","hentry","topic-tag-post_type","topic-tag-single-php"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/ru.wordpress.org\/support\/wp-json\/wp\/v2\/topic\/161598","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\/161598\/revisions"}],"wp:attachment":[{"href":"https:\/\/ru.wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=161598"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}