{"id":10531,"date":"2016-09-18T12:09:34","date_gmt":"2016-09-18T09:09:34","guid":{"rendered":"https:\/\/www.coma.lv\/?p=10531"},"modified":"2016-09-18T12:11:07","modified_gmt":"2016-09-18T09:11:07","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":"<p>\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<h4>\u0424\u043e\u043d:<\/h4>\n<p>\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<p>&nbsp;<\/p>\n<h4>\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<\/h4>\n<p>\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>\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>\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>\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( 'testimonial-thumb', 96, 96, true ); \/\/ Hard Crop Mode\r\n\r\n\/\/Register Custom Post Types\r\n\r\nadd_action( 'init', 'register_cpt_testimonial' );\r\n\r\nfunction register_cpt_testimonial() {\r\n\r\n    $labels = array( \r\n        'name' =&gt; _x( 'Testimonials', 'testimonial' ),\r\n        'singular_name' =&gt; _x( 'testimonial', 'testimonial' ),\r\n        'add_new' =&gt; _x( 'Add New', 'testimonial' ),\r\n        'add_new_item' =&gt; _x( 'Add New testimonial', 'testimonial' ),\r\n        'edit_item' =&gt; _x( 'Edit testimonial', 'testimonial' ),\r\n        'new_item' =&gt; _x( 'New testimonial', 'testimonial' ),\r\n        'view_item' =&gt; _x( 'View testimonial', 'testimonial' ),\r\n        'search_items' =&gt; _x( 'Search Testimonials', 'testimonial' ),\r\n        'not_found' =&gt; _x( 'No testimonials found', 'testimonial' ),\r\n        'not_found_in_trash' =&gt; _x( 'No testimonials found in Trash', 'testimonial' ),\r\n        'parent_item_colon' =&gt; _x( 'Parent testimonial:', 'testimonial' ),\r\n        'menu_name' =&gt; _x( 'Testimonials', 'testimonial' ),\r\n    );\r\n\r\n    $args = array( \r\n        'labels' =&gt; $labels,\r\n        'hierarchical' =&gt; false,\r\n        \r\n        'supports' =&gt; array( 'title', 'editor', 'excerpt', 'author', 'thumbnail', 'custom-fields', 'revisions' ),\r\n        \r\n        'public' =&gt; true,\r\n        'show_ui' =&gt; true,\r\n        'show_in_menu' =&gt; true,\r\n        'show_in_nav_menus' =&gt; true,\r\n        'publicly_queryable' =&gt; true,\r\n        'exclude_from_search' =&gt; false,\r\n        'has_archive' =&gt; true,\r\n        'query_var' =&gt; true,\r\n        'can_export' =&gt; true,\r\n        'rewrite' =&gt; true,\r\n        'capability_type' =&gt; 'post'\r\n    );\r\n\r\n    register_post_type( 'testimonial', $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( 'add_meta_box' ) ) {\r\nadd_meta_box( 'new-meta-boxes', ucfirst( $key ) . ' Information', 'display_meta_box', 'testimonial', 'normal', 'high' );\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 . '_wpnonce', 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; 'name' ]; ?&gt;&quot;&gt;&lt;?php echo $meta_box&#x5B; 'title' ]; ?&gt;&lt;\/label&gt;\r\n&lt;input type=&quot;text&quot; name=&quot;&lt;?php echo $meta_box&#x5B; 'name' ]; ?&gt;&quot; value=&quot;&lt;?php echo htmlspecialchars( $data&#x5B; $meta_box&#x5B; 'name' ] ] ); ?&gt;&quot; \/&gt;\r\n&lt;p&gt;&lt;?php echo $meta_box&#x5B; 'description' ]; ?&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; 'name' ] ] = $_POST&#x5B; $meta_box&#x5B; 'name' ] ];\r\n}\r\n \r\nif ( !wp_verify_nonce( $_POST&#x5B; $key . '_wpnonce' ], plugin_basename(__FILE__) ) )\r\nreturn $post_id;\r\n \r\nif ( !current_user_can( 'edit_post', $post_id ))\r\nreturn $post_id;\r\n \r\nupdate_post_meta( $post_id, $key, $data );\r\n}\r\n \r\nadd_action( 'admin_menu', 'create_meta_box' );\r\nadd_action( 'save_post', 'save_meta_box' );\r\n\r\n<\/pre>\n<p>\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>\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<h4>\u041e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0432 \u0442\u0435\u043c\u0435<\/h4>\n<p>\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>\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>\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: 'slide'\r\n     \r\n    \/\/ add dynamic plugin with optional configuration for bottom edge\r\n    }).dynamic({ bottom: { direction: 'down', bounce: true } });\r\n     \r\n});\r\n<\/pre>\n<p>\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>\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('wp_enqueue_scripts', 'tooltip_enqueue_scripts');\r\nfunction tooltip_enqueue_scripts() {\r\nif (!is_admin()) {\r\n    wp_register_script('jquery_tools', 'http:\/\/cdn.jquerytools.org\/1.2.6\/full\/jquery.tools.min.js?ver=3.4.2', 'jquery', '3.4.2', true);\r\n        wp_enqueue_script('jquery_tools');\r\n \r\n    wp_register_script('tooltip', get_stylesheet_directory_uri() . '\/scripts\/tooltip-testimonials.js', 'jquery', '1', true);\r\n        wp_enqueue_script('tooltip');\r\n}\r\n}\r\n<\/pre>\n<p>\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( 'post_type' =&gt; 'testimonial', 'posts_per_page' =&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, 'testimonial', true );\r\n$user_image_url = wp_get_attachment_image_src( get_post_thumbnail_id($loop-&gt;post-&gt;ID), 'testimonial-thumb');\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; 'position' ]; ?&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>\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>\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<p>&nbsp;<\/p>\n<hr \/>\n<p><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":10533,"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":0,"href":"https:\/\/coma.lv\/ru\/wp-json\/wp\/v2\/posts\/10531\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/coma.lv\/ru\/wp-json\/wp\/v2\/media\/10533"}],"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}]}}