{"id":10531,"date":"2016-09-18T12:09:34","date_gmt":"2016-09-18T09:09:34","guid":{"rendered":"https:\/\/www.coma.lv\/?p=10531"},"modified":"2026-04-20T05:13:05","modified_gmt":"2026-04-20T02:13:05","slug":"kak-dobavit-vsplyvayushhie-privetstviya-v-wordpress","status":"publish","type":"post","link":"https:\/\/coma.lv\/ru\/2016\/09\/18\/kak-dobavit-vsplyvayushhie-privetstviya-v-wordpress\/","title":{"rendered":"\u041a\u0430\u043a \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432\u0441\u043f\u043b\u044b\u0432\u0430\u044e\u0449\u0438\u0435 \u043f\u0440\u0438\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u044f \u0432 WordPress"},"content":{"rendered":"\n<p style=\"text-align: left;\">\u0420\u0430\u043d\u0435\u0435 \u043c\u044b \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u043b\u0438 \u0432\u0430\u043c,\u00a0<a title=\"How to Add Rotating Testimonials in WordPress\" href=\"https:\/\/coma.lv\/2016\/09\/01\/kak-sdelat-pereklyuchayushhiesya-otzyvy-v-wordpress\/\">\u043a\u0430\u043a \u0434\u043e\u0431\u0430\u0432\u043b\u044f\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<\/a>. \u0421\u0435\u0433\u043e\u0434\u043d\u044f \u0436\u0435 \u043c\u044b \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0435\u043c \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u043a\u0430\u043a\u0443\u044e-\u043b\u0438\u0431\u043e \u0432\u0441\u043f\u043b\u044b\u0432\u0430\u044e\u0449\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043f\u0440\u0438 \u043d\u0430\u0432\u0435\u0434\u0435\u043d\u0438\u0438 \u043a\u0443\u0440\u0441\u043e\u0440\u0430 \u043d\u0430 \u0444\u043e\u0442\u043e. \u042d\u0442\u0430 \u0442\u0435\u0445\u043d\u0438\u043a\u0430 \u0441\u0442\u0430\u043b\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u043e\u0432\u0441\u0435\u043c\u0435\u0441\u0442\u043d\u043e, \u0438 \u0432 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u043f\u043e\u043a\u0430\u0436\u0435\u043c, \u043a\u0430\u043a \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0432\u0441\u043f\u043b\u044b\u0432\u0430\u044e\u0449\u0438\u0435 \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0438 \u0432 WordPress<\/p>\n<h2 style=\"text-align: left;\">\u0424\u043e\u043d:<\/h2>\n<p style=\"text-align: left;\">\u041e\u0442 \u044d\u043a\u0441\u043f\u0435\u0440\u0442\u043e\u0432 \u0438\u043d\u0434\u0443\u0441\u0442\u0440\u0438\u0438 \u043c\u044b \u0441\u043b\u044b\u0448\u0430\u043b\u0438 \u0442\u043e, \u0447\u0442\u043e \u043f\u043e\u043a\u0430\u0437 \u043b\u0438\u0446 \u043f\u0440\u0438\u0434\u0430\u0451\u0442 \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u043e\u0442\u0442\u0435\u043d\u043e\u043a \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435. \u042d\u0442\u043e \u043f\u0440\u0438\u0447\u0438\u043d\u0430, \u043f\u043e\u0447\u0435\u043c\u0443 \u043c\u044b \u0440\u0435\u0448\u0438\u043b\u0438 \u043f\u043e\u0439\u0442\u0438 \u044d\u0442\u0438\u043c \u043f\u0443\u0442\u0451\u043c. \u0412\u043e\u0442 \u043f\u043e\u0447\u0435\u043c\u0443 \u043c\u044b \u0440\u0435\u0448\u0438\u043b\u0438 \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 \u0442\u0438\u043f\u044b \u043f\u043e\u0441\u0442\u043e\u0432 \u0438 \u043c\u0435\u0442\u0430-\u043f\u043e\u043b\u044f, \u0447\u0442\u043e\u0431\u044b \u0441\u043a\u043e\u043c\u043f\u043e\u043d\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u043e \u0441 jQuery.<\/p>\n<h2 style=\"text-align: left;\">\u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0435 \u0442\u0438\u043f\u044b \u043f\u043e\u0441\u0442\u043e\u0432 \u0438 \u043c\u0435\u0442\u0430-\u043e\u0431\u043b\u0430\u0441\u0442\u0438<\/h2>\n<p style=\"text-align: left;\">\u041d\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e, \u0447\u0442\u043e\u0431\u044b \u043a\u043b\u0438\u0435\u043d\u0442 \u0438\u043c\u0435\u043b \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c:<\/p>\n<ul style=\"text-align: left;\">\n<li>\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0444\u043e\u0442\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f (\u0418\u043a\u043e\u043d\u043a\u0430)<\/li>\n<li>\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0438\u043c\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u00a0(\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a \u043f\u043e\u0441\u0442\u0430)<\/li>\n<li>\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0442\u0435\u043a\u0441\u0442\u00a0(\u0422\u0435\u043b\u043e \u043f\u043e\u0441\u0442\u0430)<\/li>\n<li>\u041f\u043e\u0437\u0438\u0446\u0438\u044f \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u0432 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438\u00a0(\u0412\u044b\u0431\u043e\u0440\u043e\u0447\u043d\u043e\u0435 \u043f\u043e\u043b\u0435 \u0438\u043b\u0438 \u043c\u0435\u0442\u0430-\u043e\u0431\u043b\u0430\u0441\u0442\u044c)<\/li>\n<\/ul>\n<p style=\"text-align: left;\">\u041f\u0435\u0440\u0432\u044b\u043c \u0434\u0435\u043b\u043e\u043c \u043c\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439 \u0442\u0438\u043f \u043f\u043e\u0441\u0442\u0430, \u043d\u0430\u0437\u0432\u0430\u043d\u043d\u044b\u0439 \u041f\u0440\u0438\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0432\u0441\u0451 \u0435\u0441\u0442\u044c, \u043a\u0440\u043e\u043c\u0435 \u043e\u0434\u043d\u043e\u0433\u043e \u043f\u043e\u043b\u044f (\u043f\u043e\u0437\u0438\u0446\u0438\u044f \u043a\u043b\u0438\u0435\u043d\u0442\u0430\/\u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438). \u0415\u0441\u043b\u0438 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043c\u0435\u0442\u0430-\u043e\u0431\u043b\u0430\u0441\u0442\u044c, \u0442\u043e \u044d\u0442\u043e \u0432\u0430\u0448\u0435 \u0434\u0435\u043b\u043e. \u041d\u0435 \u0431\u0443\u0434\u044c\u0442\u0435 \u043b\u0435\u043d\u0438\u0432\u044b\u043c\u0438, \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0439\u0442\u0435 \u0441\u0430\u043c\u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u0430\u0440\u0443 \u0441\u0442\u0440\u043e\u043a \u043a\u043e\u0434\u0430, \u0447\u0442\u043e\u0431\u044b \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e!<\/p>\n<p style=\"text-align: left;\">\u0412\u0441\u0451, \u0447\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c, \u044d\u0442\u043e \u0432\u0437\u044f\u0442\u044c \u043a\u043e\u0434 \u0441\u043d\u0438\u0437\u0443 \u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0435\u0433\u043e \u0432 \u043f\u0443\u0441\u0442\u043e\u0439 php \u0444\u0430\u0439\u043b, \u0438 \u043d\u0430\u0437\u0432\u0430\u0442\u044c\u00a0tooltip-testimonials.php.<\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">\r\n&lt;?php\r\n\r\n\/\/Add Image Size\r\nadd_image_size( &#039;testimonial-thumb&#039;, 96, 96, true ); \/\/ Hard Crop Mode\r\n\r\n\/\/Register Custom Post Types\r\n\r\nadd_action( &#039;init&#039;, &#039;register_cpt_testimonial&#039; );\r\n\r\nfunction 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        &#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\/\/Custom Meta Box\r\n\r\n$key = &quot;testimonial&quot;;\r\n$meta_boxes = array(\r\n&quot;position&quot; =&gt; array(\r\n&quot;name&quot; =&gt; &quot;position&quot;,\r\n&quot;title&quot; =&gt; &quot;Position and Company&quot;,\r\n&quot;description&quot; =&gt; &quot;Enter their position and their company name.&quot;)\r\n);\r\n \r\nfunction 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 htmlspecialchars( $data&#x5B; $meta_box&#x5B; &#039;name&#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 save_meta_box( $post_id ) {\r\nglobal $post, $meta_boxes, $key;\r\n \r\nforeach( $meta_boxes as $meta_box ) {\r\n$data&#x5B; $meta_box&#x5B; &#039;name&#039; ] ] = $_POST&#x5B; $meta_box&#x5B; &#039;name&#039; ] ];\r\n}\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;create_meta_box&#039; );\r\nadd_action( &#039;save_post&#039;, &#039;save_meta_box&#039; );\r\n\r\n<\/pre>\n<p style=\"text-align: left;\">\u042d\u0442\u043e \u043f\u043e\u0441\u043b\u0443\u0436\u0438\u0442 \u043d\u0430\u0447\u0430\u043b\u043e\u043c \u043f\u0435\u0440\u0432\u043e\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0439 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u0438\u043c\u0435\u0442\u044c. \u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0443\u0436\u043d\u043e \u043d\u0430\u0447\u0430\u0442\u044c \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u0442\u0435\u043a\u0441\u0442, \u043f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043e\u0442\u043e\u0431\u0440\u0430\u0437\u0438\u0442\u044c \u0435\u0433\u043e. \u0412\u0441\u043f\u043e\u043c\u043d\u0438\u043c \u0435\u0449\u0451 \u0440\u0430\u0437, \u043a\u0430\u043a\u0438\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u044b:<\/p>\n<ul style=\"text-align: left;\">\n<li>\u0414\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u00a0\u0444\u043e\u0442\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f (\u0438\u043a\u043e\u043d\u043a\u0430\/\u043c\u0438\u043d\u0438\u0430\u0442\u044e\u0440\u0430 \u0437\u0430\u043f\u0438\u0441\u0438). \u041c\u044b \u0441\u043e\u0432\u0435\u0442\u0443\u0435\u043c \u0431\u0440\u0430\u0442\u044c \u0440\u0430\u0437\u043c\u0435\u0440 96\u044596 \u043f\u0438\u043a\u0441\u0435\u043b\u0435\u0439.<\/li>\n<li>\u0414\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0438\u043c\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f (\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a \u043f\u043e\u0441\u0442\u0430)<\/li>\n<li>\u0414\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0442\u0435\u043a\u0441\u0442 (\u0422\u0435\u043b\u043e \u043f\u043e\u0441\u0442\u0430)<\/li>\n<li>\u041f\u043e\u0437\u0438\u0446\u0438\u044f \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u0432 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 (\u041c\u0435\u0442\u0430-\u043e\u0431\u043b\u0430\u0441\u0442\u044c)<\/li>\n<\/ul>\n<h2 style=\"text-align: left;\">\u041e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0432 \u0442\u0435\u043c\u0435<\/h2>\n<p style=\"text-align: left;\">\u041f\u0440\u0438\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u044f \u043e\u0431\u044b\u0447\u043d\u043e \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u044b \u0434\u043b\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0445 \u0442\u0435\u043c, \u0442\u0430\u043a \u0447\u0442\u043e \u0434\u0430, \u0432\u0430\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043f\u043e\u043a\u043e\u043f\u0430\u0442\u044c\u0441\u044f \u0441 \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0442\u0435\u043c\u044b. \u041f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043a\u0430\u0436\u0434\u0430\u044f \u0442\u0435\u043c\u0430 \u0438\u043c\u0435\u0435\u0442 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0440\u0430\u0437\u043c\u0435\u0440\u044b, \u0446\u0432\u0435\u0442\u043e\u0432\u044b\u0435 \u0441\u0445\u0435\u043c\u044b \u0438 \u0441\u0442\u0438\u043b\u0438, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u044b \u0440\u0435\u0448\u0438\u043b\u0438 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0438\u043c\u0435\u043d\u043d\u043e \u0441\u0442\u0430\u0442\u044c\u044e, \u0430 \u043d\u0435 \u0433\u043e\u0442\u043e\u0432\u044b\u0439 \u043f\u043b\u0430\u0433\u0438\u043d. \u0412\u043e\u0442 \u0447\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c, \u0447\u0442\u043e\u0431\u044b \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u044c \u0442\u0430\u043a\u043e\u0433\u043e \u0440\u043e\u0434\u0430 \u0432\u0441\u043f\u043b\u044b\u0432\u0430\u044e\u0449\u0438\u0435 \u043f\u0440\u0438\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u044f \u0432 \u0432\u0430\u0448\u0435\u0439 \u0442\u0435\u043c\u0435 WordPress:<\/p>\n<ul style=\"text-align: left;\">\n<li>\u0414\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439 \u043a\u043e\u0434 \u043d\u0430 jQuery \u0432 \u0442\u0435\u043c\u0443<\/li>\n<li>\u0421\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439 \u0446\u0438\u043a\u043b, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u0432 \u0442\u043e\u0439 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u0430.<\/li>\n<li>\u0414\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0431\u043e\u043b\u044c\u0448\u0435 \u0441\u0442\u0438\u043b\u0435\u0439, \u0447\u0442\u043e\u0431\u044b \u0432\u0441\u0451 \u044d\u0442\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u043b\u043e \u043e\u043f\u0440\u044f\u0442\u043d\u0435\u0439.<\/li>\n<\/ul>\n<p style=\"text-align: left;\">\u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0443\u0436\u043d\u043e \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438 \u0432\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0439 \u043a\u043e\u0434 \u043d\u0430 jQuery \u0432 \u043f\u0443\u0441\u0442\u043e\u0439 \u0444\u0430\u0439\u043b \u0438 \u043d\u0430\u0437\u0432\u0430\u0442\u044c \u0435\u0433\u043e\u00a0<em>tooltip-testimonials.js<\/em>:<\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">\r\njQuery(document).ready(function(){\r\n     \r\n    jQuery(&quot;#testimonials img&#x5B;title]&quot;).tooltip({\r\n \r\n       \/\/ tweak the position\r\n       offset: &#x5B;0, 0],\r\n     \r\n       \/\/ use the &quot;slide&quot; effect\r\n       effect: &#039;slide&#039;\r\n     \r\n    \/\/ add dynamic plugin with optional configuration for bottom edge\r\n    }).dynamic({ bottom: { direction: &#039;down&#039;, bounce: true } });\r\n     \r\n});\r\n<\/pre>\n<p style=\"text-align: left;\">\u041a\u0430\u043a \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u044b \u0441\u0434\u0435\u043b\u0430\u0435\u0442\u0435 \u044d\u0442\u043e, \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u044d\u0442\u043e\u0442 \u0444\u0430\u0439\u043b \u0432 \u0448\u0430\u043f\u043a\u0443 \u0432\u0430\u0448\u0435\u0439 \u0442\u0435\u043c\u044b. \u0412\u044b \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u0435\u0442\u0435 \u043e\u0442\u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0444\u0430\u0439\u043b\u00a0header.php \u0432\u0440\u0443\u0447\u043d\u0443\u044e, \u0432\u0441\u0442\u0430\u0432\u0438\u0432 \u0441\u043a\u0440\u0438\u043f\u0442 \u0432 \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0430 \u0438\u043b\u0438 \u0436\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044e wp_enqueue_script. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u043c \u043d\u0430\u0448 \u0444\u0430\u0439\u043b tooltip-testimonials.js \u0432 \u043f\u0430\u043f\u043a\u0443 \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432 \u043d\u0430\u0448\u0435\u0439 \u0442\u0435\u043c\u044b. \u0415\u0441\u043b\u0438 \u0435\u0451 \u043d\u0435\u0442\u0443, \u0442\u043e \u0441\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u0435\u0451 \u0438 \u043d\u0430\u0437\u043e\u0432\u0438\u0442\u0435 scripts.<\/p>\n<p style=\"text-align: left;\">\u0414\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043a\u043e\u0434 \u043a \u0444\u0430\u0439\u043b\u0443 functions.php \u0432\u0430\u0448\u0435\u0439 \u0442\u0435\u043c\u044b:<\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">\r\nadd_action(&#039;wp_enqueue_scripts&#039;, &#039;tooltip_enqueue_scripts&#039;);\r\nfunction tooltip_enqueue_scripts() {\r\nif (!is_admin()) {\r\n    wp_register_script(&#039;jquery_tools&#039;, &#039;http:\/\/cdn.jquerytools.org\/1.2.6\/full\/jquery.tools.min.js?ver=3.4.2&#039;, &#039;jquery&#039;, &#039;3.4.2&#039;, true);\r\n        wp_enqueue_script(&#039;jquery_tools&#039;);\r\n \r\n    wp_register_script(&#039;tooltip&#039;, get_stylesheet_directory_uri() . &#039;\/scripts\/tooltip-testimonials.js&#039;, &#039;jquery&#039;, &#039;1&#039;, true);\r\n        wp_enqueue_script(&#039;tooltip&#039;);\r\n}\r\n}\r\n<\/pre>\n<p style=\"text-align: left;\">\u0422\u0435\u043f\u0435\u0440\u044c \u043e\u043d \u0443 \u043d\u0430\u0441 \u0432 \u043d\u0443\u0436\u043d\u043e\u043c \u043c\u0435\u0441\u0442\u0435, \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0446\u0438\u043a\u043b, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u043d\u0430\u043c \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0432\u0441\u043f\u043b\u044b\u0432\u0430\u044e\u0449\u0438\u0439 \u0442\u0435\u043a\u0441\u0442 \u0441 \u0444\u043e\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u044f\u043c\u0438 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 \u0441\u0435\u0442\u043a\u0438. \u041e\u0442\u043a\u0440\u043e\u0439\u0442\u0435 \u0444\u0430\u0439\u043b, \u0433\u0434\u0435 \u0431\u044b \u0432\u044b \u0445\u043e\u0442\u0435\u043b\u0438 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u043f\u0440\u0438\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u044f. \u042d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0438 \u0431\u043e\u043a\u043e\u0432\u0430\u044f \u043f\u0430\u043d\u0435\u043b\u044c, \u0438 \u0434\u043e\u043c\u0430\u0448\u043d\u044f\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430, \u0434\u0430 \u0447\u0442\u043e \u0443\u0433\u043e\u0434\u043d\u043e. \u041f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e, \u0441\u043a\u043e\u043f\u0438\u0440\u0443\u0439\u0442\u0435 \u0446\u0438\u043a\u043b:<\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">\r\n\r\n&lt;div id=&quot;testimonials&quot;&gt;\r\n&lt;div class=&quot;wrap&quot;&gt;\r\n&lt;?php\r\n$args = array( &#039;post_type&#039; =&gt; &#039;testimonial&#039;, &#039;posts_per_page&#039; =&gt; 6 );\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\n$user_image_url = wp_get_attachment_image_src( get_post_thumbnail_id($loop-&gt;post-&gt;ID), &#039;testimonial-thumb&#039;);\r\n?&gt;    \r\n    &lt;div class=&quot;testimonials&quot;&gt;\r\n        &lt;p class=&quot;center&quot;&gt;&lt;img class=&quot;frame&quot; src=&quot;&lt;?php echo $user_image_url&#x5B;0] ?&gt;&quot; title=&quot;&lt;?php echo get_the_content(); ?&gt;&quot; alt=&quot;&lt;?php echo get_the_title(); ?&gt;&quot; \/&gt;&lt;\/p&gt;\r\n        &lt;p class=&quot;testimonials-title&quot;&gt;&lt;?php echo get_the_title(); ?&gt;&lt;\/p&gt;\r\n        &lt;p class=&quot;company&quot;&gt;&lt;?php echo $data&#x5B; &#039;position&#039; ]; ?&gt;&lt;\/p&gt;\r\n    &lt;\/div&gt;\r\n&lt;?php\r\nendwhile; \r\nendif; ?&gt;\r\n\r\n&lt;\/div&gt;\r\n&lt;\/div&gt;\r\n\r\n<\/pre>\n<p style=\"text-align: left;\">\u041a\u043e\u0434 \u0446\u0438\u043a\u043b\u0430 \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u044c 6 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435. \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u0442\u0438\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0438\u0445 \u0442\u0430\u043a, \u043a\u0430\u043a \u0432\u0430\u043c \u0445\u043e\u0447\u0435\u0442\u0441\u044f. \u0412\u044b \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u0435\u0442\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c orderby = rand ,\u0435\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u043e\u043a\u043e\u043b\u043e 20 \u043f\u0440\u0438\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0439.<\/p>\n<p style=\"text-align: left;\">\u0422\u0435\u043f\u0435\u0440\u044c \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u043c CSS \u0441\u0442\u0438\u043b\u0438, \u0447\u0442\u043e\u0431\u044b \u0432\u0441\u0451 \u0431\u044b\u043b\u043e \u043a\u0440\u0430\u0441\u0438\u0432\u043e. \u0412\u043d\u0438\u0437\u0443 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0430\u0439\u0442\u0438 \u0441\u0442\u0438\u043b\u0438 CSS, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u0434\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u0445, \u0447\u0442\u043e\u0431\u044b \u043e\u043d\u0438 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u043b\u0438 \u0441\u0442\u0438\u043b\u044f\u043c \u0432\u0430\u0448\u0435\u0439 \u0442\u0435\u043c\u044b \u0438 \u0446\u0432\u0435\u0442\u043e\u0432\u043e\u0439 \u0441\u0445\u0435\u043c\u0435.<\/p>\n<pre class=\"brush: css; title: ; notranslate\" title=\"\">\r\n#testimonials .testimonials{width: 116px; float: left; margin: 35px 30px 0 0;}\r\n\r\n#testimonials .center{text-align: center; margin: 0px 0 15px;; padding: 0px;}\r\n\r\n#testimonials .center img{box-shadow: 0px 2px 2px #d2d2d2; -moz-box-shadow: 0px 2px 2px #d2d2d2; -webkit-box-shadow: 0px 2px 2px #d2d2d2; border: 3px solid #fff;}\r\n\r\n#testimonials .testimonials-title{font-size: 14px; font-weight: 700; text-align: center; margin: 3px 0 0; padding: 0px;}\r\n\r\n#testimonials .company{font-size: 12px; font-style: italic; text-align: center; margin: 0px; padding: 0px;}\r\n\r\n#testimonials .tooltip {background: #111; color: #fff; width: 200px; padding: 20px; margin: 0 5px 20px;}\r\n<\/pre>\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 \u2014 \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 \u2014 <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>\u0420\u0430\u043d\u0435\u0435 \u043c\u044b \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u043b\u0438 \u0432\u0430\u043c,\u00a0\u043a\u0430\u043a \u0434\u043e\u0431\u0430\u0432\u043b\u044f\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. \u0421\u0435\u0433\u043e\u0434\u043d\u044f \u0436\u0435 \u043c\u044b \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0435\u043c \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u043a\u0430\u043a\u0443\u044e-\u043b\u0438\u0431\u043e \u0432\u0441\u043f\u043b\u044b\u0432\u0430\u044e\u0449\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043f\u0440\u0438 \u043d\u0430\u0432\u0435\u0434\u0435\u043d\u0438\u0438 \u043a\u0443\u0440\u0441\u043e\u0440\u0430 \u043d\u0430 \u0444\u043e\u0442\u043e. \u042d\u0442\u0430 \u0442\u0435\u0445\u043d\u0438\u043a\u0430 \u0441\u0442\u0430\u043b\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u043e\u0432\u0441\u0435\u043c\u0435\u0441\u0442\u043d\u043e, \u0438 \u0432 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u043f\u043e\u043a\u0430\u0436\u0435\u043c, \u043a\u0430\u043a \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0432\u0441\u043f\u043b\u044b\u0432\u0430\u044e\u0449\u0438\u0435 \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0438 \u0432 WordPress \u0424\u043e\u043d: \u041e\u0442 \u044d\u043a\u0441\u043f\u0435\u0440\u0442\u043e\u0432 \u0438\u043d\u0434\u0443\u0441\u0442\u0440\u0438\u0438 \u043c\u044b \u0441\u043b\u044b\u0448\u0430\u043b\u0438 \u0442\u043e, \u0447\u0442\u043e \u043f\u043e\u043a\u0430\u0437 \u043b\u0438\u0446 \u043f\u0440\u0438\u0434\u0430\u0451\u0442 \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u043e\u0442\u0442\u0435\u043d\u043e\u043a [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":38822,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[573,623],"tags":[],"class_list":["post-10531","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\/10531","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=10531"}],"version-history":[{"count":2,"href":"https:\/\/coma.lv\/ru\/wp-json\/wp\/v2\/posts\/10531\/revisions"}],"predecessor-version":[{"id":38821,"href":"https:\/\/coma.lv\/ru\/wp-json\/wp\/v2\/posts\/10531\/revisions\/38821"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/coma.lv\/ru\/wp-json\/wp\/v2\/media\/38822"}],"wp:attachment":[{"href":"https:\/\/coma.lv\/ru\/wp-json\/wp\/v2\/media?parent=10531"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/coma.lv\/ru\/wp-json\/wp\/v2\/categories?post=10531"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/coma.lv\/ru\/wp-json\/wp\/v2\/tags?post=10531"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}