{"id":10169,"date":"2016-09-01T22:21:55","date_gmt":"2016-09-01T19:21:55","guid":{"rendered":"https:\/\/www.coma.lv\/?p=10169"},"modified":"2026-06-08T18:41:33","modified_gmt":"2026-06-08T15:41:33","slug":"kak-sdelat-pereklyuchayushhiesya-otzyvy-v-wordpress","status":"publish","type":"post","link":"https:\/\/coma.lv\/ru\/2016\/09\/01\/kak-sdelat-pereklyuchayushhiesya-otzyvy-v-wordpress\/","title":{"rendered":"\u041a\u0430\u043a \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0430\u044e\u0449\u0438\u0435\u0441\u044f \u043e\u0442\u0437\u044b\u0432\u044b \u0432 WordPress"},"content":{"rendered":"\n<p style=\"text-align: left;\">\u041d\u0435\u0434\u0430\u0432\u043d\u043e \u043c\u044b \u0434\u0435\u043b\u0430\u043b\u0438 \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0430\u044e\u0449\u0438\u0435\u0441\u044f \u043e\u0442\u0437\u044b\u0432\u044b \u043d\u0430 WordPress \u0434\u043b\u044f \u043e\u0434\u043d\u043e\u0433\u043e \u0438\u0437 \u043d\u0430\u0448\u0438\u0445 \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432. \u041c\u044b \u0438\u0441\u043a\u0430\u043b\u0438 \u0432 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0435, \u043d\u043e \u0442\u0430\u043a \u0438 \u043d\u0435 \u043d\u0430\u0448\u043b\u0438 \u043f\u043b\u0430\u0433\u0438\u043d, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0430\u043c \u0431\u044b\u043b \u043d\u0443\u0436\u0435\u043d. \u041c\u044b \u0440\u0435\u0448\u0438\u043b\u0438 \u043d\u0435 \u0438\u0441\u043a\u0430\u0442\u044c \u043f\u043b\u0430\u0433\u0438\u043d, \u0430 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0435\u0433\u043e \u0441 \u043d\u0443\u043b\u044f. \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u043f\u043e\u043a\u0430\u0436\u0435\u043c \u0432\u0430\u043c \u043a\u0430\u043a \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0430\u044e\u0449\u0438\u0445\u0441\u044f \u043e\u0442\u0437\u044b\u0432\u043e\u0432, \u0433\u0434\u0435 \u043e\u043d\u0438 \u0431\u0443\u0434\u0443\u0442 \u043f\u043e\u044f\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u0438 \u0438\u0441\u0447\u0435\u0437\u0430\u0442\u044c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438. \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u0443\u044e \u0442\u0435\u0445\u043d\u0438\u043a\u0443 \u0438 \u0434\u043b\u044f \u0446\u0438\u0442\u0430\u0442, \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0445 \u0444\u0430\u043a\u0442\u043e\u0432 \u0438 \u0442\u0430\u043a \u0434\u0430\u043b\u0435\u0435.<\/p>\n<p style=\"text-align: left;\">\u041f\u043e\u043c\u043d\u0438\u0442\u0435, \u0447\u0442\u043e \u0432\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u043e\u043d\u0438\u043c\u0430\u0442\u044c \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u044b \u0440\u0430\u0431\u043e\u0442\u044b\u00a0WordPress, \u0447\u0442\u043e\u0431\u044b \u043e\u0441\u0432\u043e\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b.<\/p>\n<p style=\"text-align: left;\">\u0414\u0430\u043d\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0441\u0442: \u0417\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u0439\u0442\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439 \u0442\u0438\u043f \u043f\u043e\u0441\u0442\u0430 \u0438 \u043d\u0430\u0437\u043e\u0432\u0438\u0442\u0435 \u0435\u0433\u043e \u041e\u0442\u0437\u044b\u0432\u044b. \u041c\u044b \u043f\u043e\u043a\u0430\u0436\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e: \u0438\u043c\u044f \u043a\u043b\u0438\u0435\u043d\u0442\u0430, \u0435\u0433\u043e \u043f\u043e\u0437\u0438\u0446\u0438\u044e \u0432 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438, \u0438\u043c\u044f \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 \u0438 \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043d\u0430\u0448\u0435 \u043f\u043e\u0440\u0442\u0444\u043e\u043b\u0438\u043e. \u0412\u043c\u0435\u0441\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0445\u00a0\u043f\u043e\u043b\u0435\u0439, \u043c\u044b \u0440\u0435\u0448\u0438\u043b\u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043c\u0435\u0442\u0430-\u043e\u0431\u043b\u0430\u0441\u0442\u0438, \u0447\u0442\u043e\u0431\u044b \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0432\u0432\u043e\u0434 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u0431\u043e\u043b\u0435\u0435 \u0443\u0434\u043e\u0431\u043d\u044b\u043c. \u0422\u0430\u043a\u0436\u0435 \u043c\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438 \u044d\u0444\u0444\u0435\u043a\u0442\u044b \u043f\u043e\u044f\u0432\u043b\u0435\u043d\u0438\u044f \u0438 \u0438\u0441\u0447\u0435\u0437\u043d\u043e\u0432\u0435\u043d\u0438\u044f \u043d\u0430 JavaScript \u0434\u043b\u044f \u0441\u043c\u0435\u043d\u044b \u043f\u0440\u0438\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0439 \u043d\u0430 \u0441\u0430\u043c\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435.<\/p>\n<h2 style=\"text-align: left;\">\u0428\u0430\u0433 1: \u0417\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u0439\u0442\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439\u00a0\u0442\u0438\u043f \u043f\u043e\u0441\u0442\u0430<\/h2>\n<p style=\"text-align: left;\">\u041d\u0435 \u0431\u0443\u0434\u0435\u043c \u0432\u0434\u0430\u0432\u0430\u0442\u044c\u0441\u044f \u0432 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0441\u0442\u0438 \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439 \u0442\u0438\u043f \u043f\u043e\u0441\u0442\u0430. \u041c\u044b \u0443\u0436\u0435 \u043f\u0438\u0441\u0430\u043b\u0438 \u0441\u0442\u0430\u0442\u044c\u044e \u043e \u0442\u043e\u043c, \u043a\u0430\u043a <a title=\"Creating custom post types in WordPress\" href=\"https:\/\/coma.lv\/2016\/09\/01\/kak-sozdat-polzovatelskuyu-stranitsu-v-wordpress\/\" target=\"_blank\" rel=\"noopener\">\u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0435 \u043f\u043e\u0441\u0442\u044b \u0432 WordPress<\/a>. \u0412 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0432\u044b \u0441\u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u043f\u043e\u043d\u044f\u0442\u044c \u0432\u0435\u0441\u044c \u043f\u0440\u043e\u0446\u0435\u0441\u0441. \u0422\u0430\u043c \u0442\u0430\u043a\u0436\u0435 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043c\u0435\u0442\u043e\u0434 \u0441 \u043f\u043b\u0430\u0433\u0438\u043d\u0430\u043c\u0438, \u0430 \u043d\u0435 \u043c\u0435\u0442\u043e\u0434 \u0441 \u043a\u043e\u0434\u043e\u043c. \u0415\u0441\u043b\u0438 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u043d\u0430\u0437\u0432\u0430\u0442\u044c\u00a0\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439\u00a0\u043f\u043e\u0441\u0442 &#8220;\u041e\u0442\u0437\u044b\u0432\u044b&#8221;, \u0442\u043e \u0432\u0441\u0451 \u0447\u0442\u043e \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u043e &#8211; \u0432\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0439 \u043a\u043e\u0434 \u0432 \u0444\u0430\u0439\u043b \u0442\u0435\u043c\u044b\u00a0functions.php.<\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">\r\nadd_action( &#039;init&#039;, &#039;wpb_register_cpt_testimonial&#039; );\r\n\r\nfunction wpb_register_cpt_testimonial() {\r\n\r\n    $labels = array( \r\n        &#039;name&#039; =&gt; _x( &#039;Testimonials&#039;, &#039;testimonial&#039; ),\r\n        &#039;singular_name&#039; =&gt; _x( &#039;testimonial&#039;, &#039;testimonial&#039; ),\r\n        &#039;add_new&#039; =&gt; _x( &#039;Add New&#039;, &#039;testimonial&#039; ),\r\n        &#039;add_new_item&#039; =&gt; _x( &#039;Add New testimonial&#039;, &#039;testimonial&#039; ),\r\n        &#039;edit_item&#039; =&gt; _x( &#039;Edit testimonial&#039;, &#039;testimonial&#039; ),\r\n        &#039;new_item&#039; =&gt; _x( &#039;New testimonial&#039;, &#039;testimonial&#039; ),\r\n        &#039;view_item&#039; =&gt; _x( &#039;View testimonial&#039;, &#039;testimonial&#039; ),\r\n        &#039;search_items&#039; =&gt; _x( &#039;Search Testimonials&#039;, &#039;testimonial&#039; ),\r\n        &#039;not_found&#039; =&gt; _x( &#039;No testimonials found&#039;, &#039;testimonial&#039; ),\r\n        &#039;not_found_in_trash&#039; =&gt; _x( &#039;No testimonials found in Trash&#039;, &#039;testimonial&#039; ),\r\n        &#039;parent_item_colon&#039; =&gt; _x( &#039;Parent testimonial:&#039;, &#039;testimonial&#039; ),\r\n        &#039;menu_name&#039; =&gt; _x( &#039;Testimonials&#039;, &#039;testimonial&#039; ),\r\n    );\r\n\r\n    $args = array( \r\n        &#039;labels&#039; =&gt; $labels,\r\n        &#039;hierarchical&#039; =&gt; false,\r\n        \r\n        &#039;supports&#039; =&gt; array( &#039;title&#039;, &#039;editor&#039;, &#039;excerpt&#039;, &#039;author&#039;, &#039;thumbnail&#039;, &#039;custom-fields&#039;, &#039;revisions&#039; ),\r\n        \r\n        &#039;public&#039; =&gt; true,\r\n        &#039;show_ui&#039; =&gt; true,\r\n        &#039;show_in_menu&#039; =&gt; true,\r\n        \r\n        \r\n        &#039;show_in_nav_menus&#039; =&gt; true,\r\n        &#039;publicly_queryable&#039; =&gt; true,\r\n        &#039;exclude_from_search&#039; =&gt; false,\r\n        &#039;has_archive&#039; =&gt; true,\r\n        &#039;query_var&#039; =&gt; true,\r\n        &#039;can_export&#039; =&gt; true,\r\n        &#039;rewrite&#039; =&gt; true,\r\n        &#039;capability_type&#039; =&gt; &#039;post&#039;\r\n    );\r\n\r\n    register_post_type( &#039;testimonial&#039;, $args );\r\n}\r\n<\/pre>\n<h2 style=\"text-align: left;\">\u0428\u0430\u0433 2: \u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0445\u00a0\u043c\u0435\u0442\u0430-\u043e\u0431\u043b\u0430\u0441\u0442\u0435\u0439<\/h2>\n<p style=\"text-align: left;\">\u041a\u0430\u043a \u043c\u044b \u0443\u0436\u0435 \u0433\u043e\u0432\u043e\u0440\u0438\u043b\u0438, \u0432\u043e\u0442 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c:<\/p>\n<ul style=\"text-align: left;\">\n<li>\u0418\u043c\u044f<\/li>\n<li>\u041f\u043e\u0437\u0438\u0446\u0438\u044f \u0432 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438<\/li>\n<li>\u0418\u043c\u044f \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438<\/li>\n<li>\u0421\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043f\u043e\u0440\u0442\u0444\u043e\u043b\u0438\u043e<\/li>\n<\/ul>\n<p style=\"text-align: left;\">\u0422\u0435\u043f\u0435\u0440\u044c \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0430\u0447\u0430\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0435\u00a0\u043f\u043e\u043b\u044f, \u043d\u043e \u043c\u044b \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u043b\u0438 \u0431\u044b \u0438\u043c\u0435\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u043a\u0440\u0430\u0441\u0438\u0432\u043e\u0435 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0431\u043b\u043e\u043a\u0430. \u0412\u043e\u0442 \u043a\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438 \u0434\u043b\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043c\u0435\u0442\u0430-\u043e\u0431\u043b\u0430\u0441\u0442\u0438:<\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">\r\n$key = &quot;testimonial&quot;;\r\n$meta_boxes = array(\r\n&quot;person-name&quot; =&gt; array(\r\n&quot;name&quot; =&gt; &quot;person-name&quot;,\r\n&quot;title&quot; =&gt; &quot;Person&#039;s Name&quot;,\r\n&quot;description&quot; =&gt; &quot;Enter the name of the person who gave you the testimonial.&quot;),\r\n&quot;position&quot; =&gt; array(\r\n&quot;name&quot; =&gt; &quot;position&quot;,\r\n&quot;title&quot; =&gt; &quot;Position in Company&quot;,\r\n&quot;description&quot; =&gt; &quot;Enter their position in their specific company.&quot;),\r\n&quot;company&quot; =&gt; array(\r\n&quot;name&quot; =&gt; &quot;company&quot;,\r\n&quot;title&quot; =&gt; &quot;Company Name&quot;,\r\n&quot;description&quot; =&gt; &quot;Enter the client Company Name&quot;),\r\n&quot;link&quot; =&gt; array(\r\n&quot;name&quot; =&gt; &quot;link&quot;,\r\n&quot;title&quot; =&gt; &quot;Client Link&quot;,\r\n&quot;description&quot; =&gt; &quot;Enter the link to client&#039;s site, or you can enter the link to your portfolio page where you have the client displayed.&quot;)\r\n);\r\n \r\nfunction wpb_create_meta_box() {\r\nglobal $key;\r\n \r\nif( function_exists( &#039;add_meta_box&#039; ) ) {\r\nadd_meta_box( &#039;new-meta-boxes&#039;, ucfirst( $key ) . &#039; Information&#039;, &#039;display_meta_box&#039;, &#039;testimonial&#039;, &#039;normal&#039;, &#039;high&#039; );\r\n}\r\n}\r\n \r\nfunction display_meta_box() {\r\nglobal $post, $meta_boxes, $key;\r\n?&gt;\r\n \r\n&lt;div class=&quot;form-wrap&quot;&gt;\r\n \r\n&lt;?php\r\nwp_nonce_field( plugin_basename( __FILE__ ), $key . &#039;_wpnonce&#039;, false, true );\r\n \r\nforeach($meta_boxes as $meta_box) {\r\n$data = get_post_meta($post-&gt;ID, $key, true);\r\n?&gt;\r\n \r\n&lt;div class=&quot;form-field form-required&quot;&gt;\r\n&lt;label for=&quot;&lt;?php echo $meta_box&#x5B; &#039;name&#039; ]; ?&gt;&quot;&gt;&lt;?php echo $meta_box&#x5B; &#039;title&#039; ]; ?&gt;&lt;\/label&gt;\r\n&lt;input type=&quot;text&quot; name=&quot;&lt;?php echo $meta_box&#x5B; &#039;name&#039; ]; ?&gt;&quot; value=&quot;&lt;?php echo (isset($data&#x5B; $meta_box&#x5B; &#039;name&#039; ] ]) ? htmlspecialchars( $data&#x5B; $meta_box&#x5B; &#039;name&#039; ] ] ) : &#039;&#039;); ?&gt;&quot; \/&gt;\r\n&lt;p&gt;&lt;?php echo $meta_box&#x5B; &#039;description&#039; ]; ?&gt;&lt;\/p&gt;\r\n&lt;\/div&gt;\r\n \r\n&lt;?php } ?&gt;\r\n \r\n&lt;\/div&gt;\r\n&lt;?php\r\n}\r\n \r\nfunction wpb_save_meta_box( $post_id ) {\r\nglobal $post, $meta_boxes, $key;\r\n \r\nforeach( $meta_boxes as $meta_box ) {\r\nif (isset($_POST&#x5B; $meta_box&#x5B; &#039;name&#039; ] ])) {\r\n$data&#x5B; $meta_box&#x5B; &#039;name&#039; ] ] = $_POST&#x5B; $meta_box&#x5B; &#039;name&#039; ] ];\r\n}\r\n}\r\n \r\nif (!isset($_POST&#x5B; $key . &#039;_wpnonce&#039; ])) \r\nreturn $post_id;\r\n\r\nif ( !wp_verify_nonce( $_POST&#x5B; $key . &#039;_wpnonce&#039; ], plugin_basename(__FILE__) ) )\r\nreturn $post_id;\r\n \r\nif ( !current_user_can( &#039;edit_post&#039;, $post_id ))\r\nreturn $post_id;\r\n \r\nupdate_post_meta( $post_id, $key, $data );\r\n}\r\n \r\nadd_action( &#039;admin_menu&#039;, &#039;wpb_create_meta_box&#039; );\r\nadd_action( &#039;save_post&#039;, &#039;wpb_save_meta_box&#039; );\r\n\r\n<\/pre>\n<p style=\"text-align: left;\">\u0422\u0435\u043f\u0435\u0440\u044c, \u0435\u0441\u043b\u0438 \u0432\u044b \u043f\u0435\u0440\u0435\u0439\u0434\u0451\u0442\u0435 \u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u00a0New Testimonial, \u0432\u044b \u0443\u0432\u0438\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0443 \u0432\u0430\u0441 \u043f\u043e\u044f\u0432\u0438\u0442\u0441\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0430\u044f\u00a0\u043c\u0435\u0442\u0430-\u043e\u0431\u043b\u0430\u0441\u0442\u044c.<\/p>\n<p style=\"text-align: left;\">\u0415\u0441\u043b\u0438 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043f\u043e\u043b\u044f \u0434\u043b\u044f \u043c\u0435\u0442\u0430-\u043e\u0431\u043b\u0430\u0441\u0442\u0438, \u043f\u0440\u043e\u0441\u0442\u043e \u0434\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0438\u0445 \u0432\u00a0$meta_boxes = array(.<\/p>\n<h2 style=\"text-align: left;\">\u0428\u0430\u0433 3: \u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043c\u0435\u043d\u044f\u044e\u0449\u0435\u0433\u043e\u0441\u044f \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0430<\/h2>\n<p style=\"text-align: left;\">\u041f\u0435\u0440\u0432\u044b\u043c \u0434\u0435\u043b\u043e\u043c \u043d\u0430\u043c \u043d\u0430\u0434\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c JavaScript, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u043c\u0435\u043d\u044f\u0442\u044c \u043a\u043e\u043d\u0442\u0435\u043d\u0442.<\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">\r\n&lt;script language=&quot;javascript&quot;&gt; \r\n$(document).ready(function(){\r\n\t$(&#039;#testimonials .slide&#039;);\r\n\tsetInterval(function(){\r\n\t\t$(&#039;#testimonials .slide&#039;).filter(&#039;:visible&#039;).fadeOut(1000,function(){\r\n\t\t\tif($(this).next(&#039;.slide&#039;).size()){\r\n\t\t\t\t$(this).next().fadeIn(1000);\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\t$(&#039;#testimonials .slide&#039;).eq(0).fadeIn(1000);\r\n\t\t\t}\r\n\t\t});\r\n\t},15000);\t\r\n});\t\r\n&lt;\/script&gt;\r\n<\/pre>\n<p style=\"text-align: left;\">\u0423\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c, \u0447\u0442\u043e\u00a0jQuery \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043d. \u0415\u0441\u043b\u0438 \u043d\u0435\u0442, \u0442\u043e \u0435\u0433\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c.<\/p>\n<p style=\"text-align: left;\">\u0414\u0430\u043b\u0435\u0435 \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0446\u0438\u043a\u043b, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u043e\u0442\u0437\u044b\u0432\u044b. \u0412\u043e\u0442 \u043a\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438:<\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">\r\n&lt;div id=&quot;testimonials&quot;&gt;\r\n&lt;?php\r\n$args = array( &#039;post_type&#039; =&gt; &#039;testimonial&#039;, &#039;posts_per_page&#039; =&gt; 10 );\r\n$loop = new WP_Query( $args );\r\nif ( $loop-&gt;have_posts() ) : while ( $loop-&gt;have_posts() ) : $loop-&gt;the_post();\r\n$data = get_post_meta( $loop-&gt;post-&gt;ID, &#039;testimonial&#039;, true );\r\nstatic $count = 0;\r\nif ($count == &quot;1&quot;) { ?&gt;\r\n\r\n\r\n\r\n&lt;div class=&quot;slide&quot; style=&quot;display: none;&quot;&gt;\r\n&lt;div class=&quot;client-contact-info&quot;&gt;&lt;?php echo $data&#x5B; &#039;person-name&#039; ]; ?&gt;,&amp;nbsp;&lt;?php echo $data&#x5B; &#039;position&#039; ]; ?&gt;,&amp;nbsp;&lt;a href=&quot;&lt;?php echo $data&#x5B; &#039;link&#039; ]; ?&gt;&quot; title=&quot;&lt;?php echo $data&#x5B; &#039;company&#039; ]; ?&gt;&quot;&gt;&lt;?php echo $data&#x5B; &#039;company&#039; ]; ?&gt;&lt;\/a&gt;&lt;\/div&gt;\r\n&lt;div class=&quot;clear&quot;&gt;&lt;\/div&gt;\r\n&lt;div class=&quot;testimonial-quote&quot;&gt;&lt;?php the_content(); ?&gt;&lt;\/div&gt;\r\n&lt;\/div&gt;\r\n&lt;?php }\r\nelse { ?&gt;\r\n\r\n\r\n&lt;div class=&quot;slide&quot;&gt;\r\n&lt;div class=&quot;client-contact-info&quot;&gt;&lt;?php echo $data&#x5B; &#039;person-name&#039; ]; ?&gt;,&amp;nbsp;&lt;?php echo $data&#x5B; &#039;position&#039; ]; ?&gt;,&amp;nbsp;&lt;a href=&quot;&lt;?php echo $data&#x5B; &#039;link&#039; ]; ?&gt;&quot; title=&quot;&lt;?php echo $data&#x5B; &#039;company&#039; ]; ?&gt;&quot;&gt;&lt;?php echo $data&#x5B; &#039;company&#039; ]; ?&gt;&lt;\/a&gt;&lt;\/div&gt;\r\n&lt;div class=&quot;clear&quot;&gt;&lt;\/div&gt;\r\n&lt;div class=&quot;testimonial-quote&quot;&gt;&lt;?php the_content(); ?&gt;&lt;\/div&gt;\r\n&lt;\/div&gt;\r\n\r\n&lt;?php \r\n$count++; } \r\nendwhile; \r\nendif; ?&gt;\r\n&lt;\/div&gt;\r\n\r\n<\/pre>\n<p style=\"text-align: left;\">\u041d\u0443\u0436\u043d\u043e \u0432\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0439 \u043a\u043e\u0434 \u0432 \u043b\u044e\u0431\u043e\u0435 \u043c\u0435\u0441\u0442\u043e, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u043e\u0442\u0437\u044b\u0432\u044b, \u0432\u043d\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0442\u043e\u0433\u043e, \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043b\u0438 \u044d\u0442\u043e \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435\u0439,\u00a0<a title=\"Creating a custom page template in WordPress\" href=\"https:\/\/coma.lv\/2016\/09\/01\/kak-sozdat-polzovatelskuyu-stranitsu-v-wordpress\/\" target=\"_blank\" rel=\"noopener\">\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u043c \u043f\u043e\u0441\u0442\u043e\u043c<\/a>, \u0431\u043e\u043a\u043e\u0432\u043e\u0439 \u043f\u0430\u043d\u0435\u043b\u044c\u044e \u0438\u043b\u0438 \u043d\u0438\u0436\u043d\u0438\u043c \u043a\u043e\u043b\u043e\u043d\u0442\u0438\u0442\u0443\u043b\u043e\u043c. \u0412\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u043c\u0435\u0441\u0442\u043e \u0438 \u0432\u0441\u0442\u0430\u0432\u044c\u0442\u0435 \u043a\u043e\u0434.<\/p>\n<p style=\"text-align: left;\">\u041d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u043f\u043e\u044f\u0441\u043d\u0435\u043d\u0438\u0435, \u043f\u043e\u0447\u0435\u043c\u0443 \u044d\u0442\u043e\u0442 \u0446\u0438\u043a\u043b \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0431\u043e\u043b\u0435\u0435 \u0441\u043b\u043e\u0436\u043d\u044b\u0439, \u0447\u0435\u043c \u043e\u0431\u044b\u0447\u043d\u044b\u0439 \u0446\u0438\u043a\u043b. \u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u0446\u0438\u043a\u043b \u0432\u044b\u0442\u044f\u0433\u0438\u0432\u0430\u0435\u0442 \u043f\u043e\u0441\u0442\u044b \u0438\u0437 \u0442\u0438\u043f\u0430 \u043f\u043e\u0441\u0442\u043e\u0432 &#8220;\u041e\u0442\u0437\u044b\u0432\u044b&#8221;. \u041c\u044b \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u043b\u0438\u0448\u044c 10 \u043d\u0435\u0434\u0430\u0432\u043d\u0438\u0445 \u043e\u0442\u0437\u044b\u0432\u043e\u0432. \u0421\u043a\u0440\u0438\u043f\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0442\u0430\u043a, \u0447\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u043b\u0438\u0448\u044c \u043e\u0434\u0438\u043d \u043f\u043e\u0441\u0442, \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 9 \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u043d\u0435\u0432\u0438\u0434\u0438\u043c\u044b\u043c\u0438, \u0438 \u043c\u043e\u0433\u0443\u0442 \u043f\u043e\u044f\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u0438\u043b\u0438 \u0438\u0441\u0447\u0435\u0437\u0430\u0442\u044c.<\/p>\n<p style=\"text-align: left;\">\u041a\u0430\u043a \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u044b \u0432\u0441\u0442\u0430\u0432\u0438\u043b\u0438 \u043a\u043e\u0434, \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u043a \u043d\u0435\u043c\u0443 \u0441\u0442\u0438\u043b\u0438.<\/p>\n<pre class=\"brush: css; title: ; notranslate\" title=\"\">\r\n#testimonials{}\r\n#testimonials .slide{color: #9c968e;}\r\n#testimonials .client-contact-info{margin: 25px 0 0 0; float: left;}\r\n#testimonials .testimonial-quote{padding: 3px 0 0 65px; line-height: 1.5em; font-family: &quot;proxima-nova-1&quot;, &quot;proxima-nova-2&quot;, Helvetica, Arial, sans-serif !important; font-size: 16px; font-weight: normal; font-style: italic; margin: 10px 0 20px 0;}\r\n<\/pre>\n<p style=\"text-align: left;\">\u0422\u0435\u043f\u0435\u0440\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0442\u0430\u043a:<\/p>\n<p style=\"text-align: left;\">\u0418\u043c\u044f \u043a\u043b\u0438\u0435\u043d\u0442\u0430, \u0415\u0433\u043e \u043f\u043e\u0437\u0438\u0446\u0438\u044f \u0432 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438, \u0418\u043c\u044f \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438\u00a0(\u0441\u0441\u044b\u043b\u043a\u0430)<br \/>\n\u0422\u0435\u043a\u0441\u0442 \u043f\u0440\u0438\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u044f<\/p>\n<p style=\"text-align: left;\">\u041e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u043b\u0438\u0448\u044c \u0443\u043f\u043e\u043c\u044f\u043d\u0443\u0442\u044c \u043f\u0430\u0440\u0443 \u043c\u0435\u043b\u043e\u0447\u0435\u0439. \u0415\u0441\u043b\u0438 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043f\u043e\u043b\u044f, \u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0442\u0430\u043a\u0436\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0438\u0445 \u043a \u0446\u0438\u043a\u043b\u0443. \u0421\u0442\u0438\u043b\u0438 \u043c\u043e\u0436\u043d\u043e \u0438\u0437\u043c\u0435\u043d\u044f\u0442\u044c \u043a\u043e\u0433\u0434\u0430 \u0438 \u043a\u0430\u043a \u0445\u043e\u0442\u0438\u0442\u0435.<\/p>\n<p style=\"text-align: left;\">\u0422\u0430\u043a \u043a\u0430\u043a \u044d\u0442\u0430 \u0432\u0435\u0449\u044c \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u043d\u0430, \u0442\u043e \u0438 \u043d\u0435 \u0441\u0442\u043e\u0438\u0442 \u0432\u044b\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u043f\u043b\u0430\u0433\u0438\u043d \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e. \u041e\u0434\u043d\u0430\u043a\u043e, \u0435\u0441\u043b\u0438 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0434\u043e\u0431\u0438\u0442\u044c\u0441\u044f \u0442\u043e\u0447\u043d\u043e \u0442\u0430\u043a\u043e\u0433\u043e \u0436\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 \u043a\u0430\u043a \u0438 \u0432 \u043d\u0430\u0448\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0435, \u0442\u043e \u0432\u0430\u043c \u043f\u043e\u0432\u0435\u0437\u043b\u043e.<\/p>\n<p style=\"text-align: left;\">\u041f\u0440\u043e\u0441\u0442\u043e \u0441\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u043d\u043e\u0432\u044b\u0439 \u0444\u0430\u0439\u043b \u0438 \u043d\u0430\u0437\u043e\u0432\u0438\u0442\u0435 \u0435\u0433\u043e\u00a0testimonials.php, \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u0435 \u0435\u0433\u043e \u0432 \u043f\u0430\u043f\u043a\u0435 \u0441 \u043f\u043b\u0430\u0433\u0438\u043d\u0430\u043c\u0438 (\/wp-content\/plugins\/). \u041f\u043e\u0441\u043b\u0435 \u0432\u0441\u0442\u0430\u0432\u044c\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043a\u043e\u0434 \u0432 \u0444\u0430\u0439\u043b:<\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">\r\n                                             \r\n                                             \r\n&lt;?php \r\n\r\n\r\nadd_action( &#039;init&#039;, &#039;wpb_register_cpt_testimonial&#039; );\r\n\r\nfunction wpb_register_cpt_testimonial() {\r\n\r\n    $labels = array( \r\n        &#039;name&#039; =&gt; _x( &#039;Testimonials&#039;, &#039;testimonial&#039; ),\r\n        &#039;singular_name&#039; =&gt; _x( &#039;testimonial&#039;, &#039;testimonial&#039; ),\r\n        &#039;add_new&#039; =&gt; _x( &#039;Add New&#039;, &#039;testimonial&#039; ),\r\n        &#039;add_new_item&#039; =&gt; _x( &#039;Add New testimonial&#039;, &#039;testimonial&#039; ),\r\n        &#039;edit_item&#039; =&gt; _x( &#039;Edit testimonial&#039;, &#039;testimonial&#039; ),\r\n        &#039;new_item&#039; =&gt; _x( &#039;New testimonial&#039;, &#039;testimonial&#039; ),\r\n        &#039;view_item&#039; =&gt; _x( &#039;View testimonial&#039;, &#039;testimonial&#039; ),\r\n        &#039;search_items&#039; =&gt; _x( &#039;Search Testimonials&#039;, &#039;testimonial&#039; ),\r\n        &#039;not_found&#039; =&gt; _x( &#039;No testimonials found&#039;, &#039;testimonial&#039; ),\r\n        &#039;not_found_in_trash&#039; =&gt; _x( &#039;No testimonials found in Trash&#039;, &#039;testimonial&#039; ),\r\n        &#039;parent_item_colon&#039; =&gt; _x( &#039;Parent testimonial:&#039;, &#039;testimonial&#039; ),\r\n        &#039;menu_name&#039; =&gt; _x( &#039;Testimonials&#039;, &#039;testimonial&#039; ),\r\n    );\r\n\r\n    $args = array( \r\n        &#039;labels&#039; =&gt; $labels,\r\n        &#039;hierarchical&#039; =&gt; false,\r\n        \r\n        &#039;supports&#039; =&gt; array( &#039;title&#039;, &#039;editor&#039;, &#039;excerpt&#039;, &#039;author&#039;, &#039;thumbnail&#039;, &#039;custom-fields&#039;, &#039;revisions&#039; ),\r\n        \r\n        &#039;public&#039; =&gt; true,\r\n        &#039;show_ui&#039; =&gt; true,\r\n        &#039;show_in_menu&#039; =&gt; true,\r\n        \r\n        \r\n        &#039;show_in_nav_menus&#039; =&gt; true,\r\n        &#039;publicly_queryable&#039; =&gt; true,\r\n        &#039;exclude_from_search&#039; =&gt; false,\r\n        &#039;has_archive&#039; =&gt; true,\r\n        &#039;query_var&#039; =&gt; true,\r\n        &#039;can_export&#039; =&gt; true,\r\n        &#039;rewrite&#039; =&gt; true,\r\n        &#039;capability_type&#039; =&gt; &#039;post&#039;\r\n    );\r\n\r\n    register_post_type( &#039;testimonial&#039;, $args );\r\n}\r\n\r\n$key = &quot;testimonial&quot;;\r\n$meta_boxes = array(\r\n&quot;person-name&quot; =&gt; array(\r\n&quot;name&quot; =&gt; &quot;person-name&quot;,\r\n&quot;title&quot; =&gt; &quot;Person&#039;s Name&quot;,\r\n&quot;description&quot; =&gt; &quot;Enter the name of the person who gave you the testimonial.&quot;),\r\n&quot;position&quot; =&gt; array(\r\n&quot;name&quot; =&gt; &quot;position&quot;,\r\n&quot;title&quot; =&gt; &quot;Position in Company&quot;,\r\n&quot;description&quot; =&gt; &quot;Enter their position in their specific company.&quot;),\r\n&quot;company&quot; =&gt; array(\r\n&quot;name&quot; =&gt; &quot;company&quot;,\r\n&quot;title&quot; =&gt; &quot;Company Name&quot;,\r\n&quot;description&quot; =&gt; &quot;Enter the client Company Name&quot;),\r\n&quot;link&quot; =&gt; array(\r\n&quot;name&quot; =&gt; &quot;link&quot;,\r\n&quot;title&quot; =&gt; &quot;Client Link&quot;,\r\n&quot;description&quot; =&gt; &quot;Enter the link to client&#039;s site, or you can enter the link to your portfolio page where you have the client displayed.&quot;)\r\n);\r\n \r\nfunction wpb_create_meta_box() {\r\nglobal $key;\r\n \r\nif( function_exists( &#039;add_meta_box&#039; ) ) {\r\nadd_meta_box( &#039;new-meta-boxes&#039;, ucfirst( $key ) . &#039; Information&#039;, &#039;display_meta_box&#039;, &#039;testimonial&#039;, &#039;normal&#039;, &#039;high&#039; );\r\n}\r\n}\r\n \r\nfunction display_meta_box() {\r\nglobal $post, $meta_boxes, $key;\r\n?&gt;\r\n \r\n&lt;div class=&quot;form-wrap&quot;&gt;\r\n \r\n&lt;?php\r\nwp_nonce_field( plugin_basename( __FILE__ ), $key . &#039;_wpnonce&#039;, false, true );\r\n \r\nforeach($meta_boxes as $meta_box) {\r\n$data = get_post_meta($post-&gt;ID, $key, true);\r\n?&gt;\r\n \r\n&lt;div class=&quot;form-field form-required&quot;&gt;\r\n&lt;label for=&quot;&lt;?php echo $meta_box&#x5B; &#039;name&#039; ]; ?&gt;&quot;&gt;&lt;?php echo $meta_box&#x5B; &#039;title&#039; ]; ?&gt;&lt;\/label&gt;\r\n&lt;input type=&quot;text&quot; name=&quot;&lt;?php echo $meta_box&#x5B; &#039;name&#039; ]; ?&gt;&quot; value=&quot;&lt;?php echo (isset($data&#x5B; $meta_box&#x5B; &#039;name&#039; ] ]) ? htmlspecialchars( $data&#x5B; $meta_box&#x5B; &#039;name&#039; ] ] ) : &#039;&#039;); ?&gt;&quot; \/&gt;\r\n&lt;p&gt;&lt;?php echo $meta_box&#x5B; &#039;description&#039; ]; ?&gt;&lt;\/p&gt;\r\n&lt;\/div&gt;\r\n \r\n&lt;?php } ?&gt;\r\n \r\n&lt;\/div&gt;\r\n&lt;?php\r\n}\r\n \r\nfunction wpb_save_meta_box( $post_id ) {\r\nglobal $post, $meta_boxes, $key;\r\n \r\nforeach( $meta_boxes as $meta_box ) {\r\nif (isset($_POST&#x5B; $meta_box&#x5B; &#039;name&#039; ] ])) {\r\n$data&#x5B; $meta_box&#x5B; &#039;name&#039; ] ] = $_POST&#x5B; $meta_box&#x5B; &#039;name&#039; ] ];\r\n}\r\n}\r\n \r\nif (!isset($_POST&#x5B; $key . &#039;_wpnonce&#039; ])) \r\nreturn $post_id;\r\n\r\nif ( !wp_verify_nonce( $_POST&#x5B; $key . &#039;_wpnonce&#039; ], plugin_basename(__FILE__) ) )\r\nreturn $post_id;\r\n \r\nif ( !current_user_can( &#039;edit_post&#039;, $post_id ))\r\nreturn $post_id;\r\n \r\nupdate_post_meta( $post_id, $key, $data );\r\n}\r\n \r\nadd_action( &#039;admin_menu&#039;, &#039;wpb_create_meta_box&#039; );\r\nadd_action( &#039;save_post&#039;, &#039;wpb_save_meta_box&#039; );\r\n\r\n\r\n\r\nfunction wpb_display_testimonials() { ?&gt;\r\n&lt;script language=&quot;javascript&quot;&gt; \r\n$(document).ready(function(){\r\n\t$(&#039;#testimonials .slide&#039;);\r\n\tsetInterval(function(){\r\n\t\t$(&#039;#testimonials .slide&#039;).filter(&#039;:visible&#039;).fadeOut(1000,function(){\r\n\t\t\tif($(this).next(&#039;.slide&#039;).size()){\r\n\t\t\t\t$(this).next().fadeIn(1000);\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\t$(&#039;#testimonials .slide&#039;).eq(0).fadeIn(1000);\r\n\t\t\t}\r\n\t\t});\r\n\t},15000);\t\r\n});\t\r\n&lt;\/script&gt; \r\n&lt;style type=&quot;text\/css&quot;&gt;\r\n#testimonials .slide{color: #9c968e;}\r\n#testimonials .client-contact-info{margin: 25px 0 0 0; float: left;}\r\n#testimonials .testimonial-quote{background: url(images\/quotebg.png) repeat-y; padding: 3px 0 0 65px; line-height: 1.5em; font-family: &quot;proxima-nova-1&quot;, &quot;proxima-nova-2&quot;, Helvetica, Arial, sans-serif !important; font-size: 16px; font-weight: normal; font-style: italic; margin: 10px 0 20px 0;}\r\n&lt;\/style&gt;\r\n&lt;div id=&quot;testimonials&quot;&gt;\r\n&lt;?php\r\n$args = array( &#039;post_type&#039; =&gt; &#039;testimonial&#039;, &#039;posts_per_page&#039; =&gt; 100, &#039;orderby&#039;   =&gt; &#039;menu_order&#039;, &#039;order&#039;     =&gt; &#039;ASC&#039; );\r\n$loop = new WP_Query( $args );\r\nif ( $loop-&gt;have_posts() ) : while ( $loop-&gt;have_posts() ) : $loop-&gt;the_post();\r\n$data = get_post_meta( $loop-&gt;post-&gt;ID, &#039;testimonial&#039;, true );\r\nstatic $count = 0;\r\nif ($count == &quot;1&quot;) { ?&gt;\r\n\r\n\r\n\r\n&lt;div class=&quot;slide&quot; style=&quot;display: none;&quot;&gt;\r\n&lt;div class=&quot;client-contact-info&quot;&gt;&lt;?php echo $data&#x5B; &#039;person-name&#039; ]; ?&gt;,&amp;nbsp;&lt;?php echo $data&#x5B; &#039;position&#039; ]; ?&gt;,&amp;nbsp;&lt;a href=&quot;&lt;?php echo $data&#x5B; &#039;link&#039; ]; ?&gt;&quot; title=&quot;&lt;?php echo $data&#x5B; &#039;company&#039; ]; ?&gt;&quot;&gt;&lt;?php echo $data&#x5B; &#039;company&#039; ]; ?&gt;&lt;\/a&gt;&lt;\/div&gt;\r\n&lt;div class=&quot;clear&quot;&gt;&lt;\/div&gt;\r\n&lt;div class=&quot;testimonial-quote&quot;&gt;&lt;?php the_content(); ?&gt;&lt;\/div&gt;\r\n&lt;\/div&gt;\r\n&lt;?php }\r\nelse { ?&gt;\r\n\r\n\r\n&lt;div class=&quot;slide&quot;&gt;\r\n&lt;div class=&quot;client-contact-info&quot;&gt;&lt;?php echo $data&#x5B; &#039;person-name&#039; ]; ?&gt;,&amp;nbsp;&lt;?php echo $data&#x5B; &#039;position&#039; ]; ?&gt;,&amp;nbsp;&lt;a href=&quot;&lt;?php echo $data&#x5B; &#039;link&#039; ]; ?&gt;&quot; title=&quot;&lt;?php echo $data&#x5B; &#039;company&#039; ]; ?&gt;&quot;&gt;&lt;?php echo $data&#x5B; &#039;company&#039; ]; ?&gt;&lt;\/a&gt;&lt;\/div&gt;\r\n&lt;div class=&quot;clear&quot;&gt;&lt;\/div&gt;\r\n&lt;div class=&quot;testimonial-quote&quot;&gt;&lt;?php the_content(); ?&gt;&lt;\/div&gt;\r\n&lt;\/div&gt;\r\n\r\n&lt;?php \r\n$count++; } \r\nendwhile; \r\nendif;\r\necho &#039;&lt;\/div&gt;&#039;;\r\n}\r\n?&gt;\r\n<\/pre>\n<p style=\"text-align: left;\">\u0422\u0435\u043f\u0435\u0440\u044c \u043e\u0442\u043a\u0440\u043e\u0439\u0442\u0435 \u0432\u0430\u0448 \u0444\u0430\u0439\u043b \u0442\u0435\u043c\u044b, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u043e\u0442\u043e\u0431\u0440\u0430\u0437\u0438\u0442\u044c \u0432\u0441\u0451 \u044d\u0442\u043e, \u0438 \u0432\u0441\u0442\u0430\u0432\u044c\u0442\u0435 \u043a\u043e\u0434:<\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">\r\n&lt;?php wpb_display_testimonials(); ?&gt;\r\n<\/pre>\n<p style=\"text-align: left;\">\u0412\u044b \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0441\u0442\u0438\u043b\u0438. \u041f\u043e\u043c\u043d\u0438\u0442\u0435, \u0447\u0442\u043e \u0435\u0441\u043b\u0438 jQuery \u043d\u0435 \u0431\u044b\u043b \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d \u0432 \u0442\u0435\u043c\u0443, \u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0435\u0433\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c.<\/p>\n<p style=\"text-align: left;\">\u041d\u0430\u0434\u0435\u0435\u043c\u0441\u044f, \u0434\u0430\u043d\u043d\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f \u0432\u0430\u043c \u043f\u043e\u043c\u043e\u0433\u043b\u0430, \u0435\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u0432\u043e\u043f\u0440\u043e\u0441\u044b, \u0442\u043e \u043d\u0430\u043f\u0438\u0448\u0438\u0442\u0435 \u0435\u0433\u043e \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445.<\/p>\n<hr \/>\n<p style=\"text-align: left;\"><em>\u041d\u0430\u0448\u0430 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c &#8211; \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0438 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u0441\u0430\u0439\u0442\u043e\u0432 \u043d\u0430 WordPress. \u041a\u043e\u043d\u0442\u0430\u043a\u0442\u044b \u0434\u043b\u044f \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u043e\u0439 \u043a\u043e\u043d\u0441\u0443\u043b\u044c\u0442\u0430\u0446\u0438\u0438 &#8211; <a href=\"mailto:vadim@coma.lv\">vadim@coma.lv<\/a>, <a href=\"tel:+37129394520\">+371 29394520<\/a><\/em><\/p>\n<hr \/>\n","protected":false},"excerpt":{"rendered":"<p>\u041d\u0435\u0434\u0430\u0432\u043d\u043e \u043c\u044b \u0434\u0435\u043b\u0430\u043b\u0438 \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0430\u044e\u0449\u0438\u0435\u0441\u044f \u043e\u0442\u0437\u044b\u0432\u044b \u043d\u0430 WordPress \u0434\u043b\u044f \u043e\u0434\u043d\u043e\u0433\u043e \u0438\u0437 \u043d\u0430\u0448\u0438\u0445 \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432. \u041c\u044b \u0438\u0441\u043a\u0430\u043b\u0438 \u0432 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0435, \u043d\u043e \u0442\u0430\u043a \u0438 \u043d\u0435 \u043d\u0430\u0448\u043b\u0438 \u043f\u043b\u0430\u0433\u0438\u043d, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0430\u043c \u0431\u044b\u043b \u043d\u0443\u0436\u0435\u043d. \u041c\u044b \u0440\u0435\u0448\u0438\u043b\u0438 \u043d\u0435 \u0438\u0441\u043a\u0430\u0442\u044c \u043f\u043b\u0430\u0433\u0438\u043d, \u0430 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0435\u0433\u043e \u0441 \u043d\u0443\u043b\u044f. \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u043f\u043e\u043a\u0430\u0436\u0435\u043c \u0432\u0430\u043c \u043a\u0430\u043a \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0430\u044e\u0449\u0438\u0445\u0441\u044f \u043e\u0442\u0437\u044b\u0432\u043e\u0432, \u0433\u0434\u0435 \u043e\u043d\u0438 \u0431\u0443\u0434\u0443\u0442 \u043f\u043e\u044f\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u0438 \u0438\u0441\u0447\u0435\u0437\u0430\u0442\u044c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438. \u0412\u044b [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":39500,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[573,623],"tags":[],"class_list":["post-10169","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-wordpress","category-tutorialy"],"_links":{"self":[{"href":"https:\/\/coma.lv\/ru\/wp-json\/wp\/v2\/posts\/10169","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/coma.lv\/ru\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/coma.lv\/ru\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/coma.lv\/ru\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/coma.lv\/ru\/wp-json\/wp\/v2\/comments?post=10169"}],"version-history":[{"count":2,"href":"https:\/\/coma.lv\/ru\/wp-json\/wp\/v2\/posts\/10169\/revisions"}],"predecessor-version":[{"id":39499,"href":"https:\/\/coma.lv\/ru\/wp-json\/wp\/v2\/posts\/10169\/revisions\/39499"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/coma.lv\/ru\/wp-json\/wp\/v2\/media\/39500"}],"wp:attachment":[{"href":"https:\/\/coma.lv\/ru\/wp-json\/wp\/v2\/media?parent=10169"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/coma.lv\/ru\/wp-json\/wp\/v2\/categories?post=10169"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/coma.lv\/ru\/wp-json\/wp\/v2\/tags?post=10169"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}