{"id":255,"date":"2012-08-01T01:35:24","date_gmt":"2012-08-01T01:35:24","guid":{"rendered":"http:\/\/pixert.com\/blog\/?p=255"},"modified":"2012-08-01T01:36:51","modified_gmt":"2012-08-01T01:36:51","slug":"how-to-add-pinterest-button-on-wordpress-attachment-file","status":"publish","type":"post","link":"https:\/\/pixert.com\/blog\/how-to-add-pinterest-button-on-wordpress-attachment-file\/","title":{"rendered":"How to add Pinterest Button on WordPress Attachment file"},"content":{"rendered":"<p><a href=\"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2012\/02\/pinterestlogo.png\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"200\" data-permalink=\"https:\/\/pixert.com\/blog\/how-to-add-pinterest-button-on-wordpress-attachment-file\/pinterestlogo\/\" data-orig-file=\"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2012\/02\/pinterestlogo.png?fit=400%2C101&amp;ssl=1\" data-orig-size=\"400,101\" data-comments-opened=\"0\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}\" data-image-title=\"pinterestlogo\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2012\/02\/pinterestlogo.png?fit=300%2C75&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2012\/02\/pinterestlogo.png?fit=400%2C101&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2012\/02\/pinterestlogo.png?resize=400%2C101\" alt=\"\" title=\"pinterestlogo\" width=\"400\" height=\"101\" class=\"alignnone size-full wp-image-200\" srcset=\"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2012\/02\/pinterestlogo.png?w=400&amp;ssl=1 400w, https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2012\/02\/pinterestlogo.png?resize=300%2C75&amp;ssl=1 300w\" sizes=\"auto, (max-width: 400px) 100vw, 400px\" \/><\/a><br \/>\nSee <a href=\"http:\/\/pixert.com\/blog\/how-to-add-pinterest-pin-it-to-wordpress\/\" title=\"How to Add Pinterest Pin It to WordPress\">How to Add Pinterest &#8220;Pin It&#8221; to WordPress<\/a> for introduction<br \/>\nCodes in article above may work for Posts, but there&#8217;s a little tweak for Pinterest Pin It button on <a href=\"http:\/\/codex.wordpress.org\/images\/1\/18\/Template_Hierarchy.png\" title=\"WordPress Template Hierarchy\">attachment.php<\/a> to work<\/p>\n<pre class=\"brush: php; title: Code Block; notranslate\" title=\"Code Block\">\r\n&lt;div class=&quot;pinterest&quot;&gt;\r\n&lt;a href=&quot;http:\/\/pinterest.com\/pin\/create\/button\/?url=&lt;?php the_permalink(); ?&gt;&amp;media=&lt;?php echo wp_get_attachment_url(); ?&gt;&amp;description=&lt;?php the_title(); ?&gt; on &lt;?php bloginfo('url'); ?&gt;&quot; class=&quot;pin-it-button&quot; count-layout=&quot;vertical&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;\/\/assets.pinterest.com\/images\/PinExt.png&quot; title=&quot;Pin It&quot;&gt;&lt;\/a&gt;\r\n&lt;\/div&gt;\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>See How to Add Pinterest &#8220;Pin It&#8221; to WordPress for introduction Codes in article above may work for Posts, but there&#8217;s a little tweak for Pinterest Pin It button on attachment.php to work &lt;div class=&quot;pinterest&quot;&gt; &lt;a href=&quot;http:\/\/pinterest.com\/pin\/create\/button\/?url=&lt;?php the_permalink(); ?&gt;&amp;media=&lt;?php echo wp_get_attachment_url(); ?&gt;&amp;description=&lt;?php the_title(); ?&gt; on &lt;?php bloginfo(&#8216;url&#8217;); ?&gt;&quot; class=&quot;pin-it-button&quot; count-layout=&quot;vertical&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;\/\/assets.pinterest.com\/images\/PinExt.png&quot; title=&quot;Pin It&quot;&gt;&lt;\/a&gt; &lt;\/div&gt;<\/p>\n","protected":false},"author":1,"featured_media":200,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[5],"tags":[82,6],"class_list":["post-255","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-wordpress","tag-pinterest","tag-wordpress-2"],"aioseo_notices":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2012\/02\/pinterestlogo.png?fit=400%2C101&ssl=1","jetpack_shortlink":"https:\/\/wp.me\/p1pvi1-47","jetpack-related-posts":[{"id":191,"url":"https:\/\/pixert.com\/blog\/how-to-add-pinterest-pin-it-to-wordpress\/","url_meta":{"origin":255,"position":0},"title":"How to Add Pinterest &#8220;Pin It&#8221; to WordPress","author":"Pixel Insert \/ Pixert","date":"February 14, 2012","format":false,"excerpt":"Pinterest is a vision board-styled social photo sharing website and app where users can create and manage theme-based image collections. Users of Pinterest curate themed image boards, populating them with media found online using the \"Pin It\" button, or uploaded from their computer. Each such item of media is known\u2026","rel":"","context":"In &quot;WordPress&quot;","block_context":{"text":"WordPress","link":"https:\/\/pixert.com\/blog\/category\/wordpress\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":105,"url":"https:\/\/pixert.com\/blog\/facebook-share-button\/","url_meta":{"origin":255,"position":1},"title":"Facebook Share Button","author":"Pixel Insert \/ Pixert","date":"May 14, 2011","format":false,"excerpt":"Facebook Share is one of the most powerful and simple ways for users to share articles, pages, video, or Flash content from your site with their friends on Facebook. Over 1 billion pieces of content are shared each week on Facebook, and many of those are links shared using Facebook\u2026","rel":"","context":"In &quot;Code Snippet&quot;","block_context":{"text":"Code Snippet","link":"https:\/\/pixert.com\/blog\/category\/code-snippet\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2011\/05\/fbshare.jpg?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":42,"url":"https:\/\/pixert.com\/blog\/add-facebook-like-to-wordpress\/","url_meta":{"origin":255,"position":2},"title":"Add Facebook Like to WordPress","author":"Pixel Insert \/ Pixert","date":"March 10, 2011","format":false,"excerpt":"Facebook released Social Plugin in their recent F8 conference. It lets you see what friends have liked, commented on or shared on sites across the web. The Facebook button enables users to post pages from that site back to your Facebook profile with one click I added Facebook button manually\u2026","rel":"","context":"In &quot;WordPress&quot;","block_context":{"text":"WordPress","link":"https:\/\/pixert.com\/blog\/category\/wordpress\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2011\/03\/do-you-have-facebook.jpg?fit=500%2C373&ssl=1&resize=350%2C200","width":350,"height":200},"classes":[]},{"id":253,"url":"https:\/\/pixert.com\/blog\/how-to-301-redirect-all-404-error-pages-to-homepage-in-wordpress\/","url_meta":{"origin":255,"position":3},"title":"How to 301 Redirect All 404 Error Pages to Homepage in WordPress","author":"Pixel Insert \/ Pixert","date":"October 6, 2012","format":false,"excerpt":"404 Not Found errors are generated when users follow broken\/dead links. \u00a0You\u2019d be amazed how many 404 errors even the best websites have. \u00a0The quickest fix is to redirect your 404 errors to your home page. Almost every theme that you use with your self hosted WordPress Blog have an\u2026","rel":"","context":"In &quot;WordPress&quot;","block_context":{"text":"WordPress","link":"https:\/\/pixert.com\/blog\/category\/wordpress\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2011\/03\/wordpresslogo-300x68.png?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":271,"url":"https:\/\/pixert.com\/blog\/wordpress-theme-review-pinboard-by-themify\/","url_meta":{"origin":255,"position":4},"title":"WordPress Theme Review : Pinboard by Themify","author":"Pixel Insert \/ Pixert","date":"December 11, 2012","format":false,"excerpt":"Pinterest has obviously gotten a lot of attention lately,it\u00a0focuses on visual appearance to spread your words and it is one of the best way inspire people nowadays. Pinterest is using dynamic grid layout, features an auto stacking layout with infinite scroll. Themify created Pinterest style theme for WordPress name Pinboard\u2026","rel":"","context":"In &quot;WordPress&quot;","block_context":{"text":"WordPress","link":"https:\/\/pixert.com\/blog\/category\/wordpress\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2012\/12\/pinboardskins.jpg?fit=1200%2C1193&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2012\/12\/pinboardskins.jpg?fit=1200%2C1193&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2012\/12\/pinboardskins.jpg?fit=1200%2C1193&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2012\/12\/pinboardskins.jpg?fit=1200%2C1193&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2012\/12\/pinboardskins.jpg?fit=1200%2C1193&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":305,"url":"https:\/\/pixert.com\/blog\/wordpress-conditional-tag-to-check-specific-menu\/","url_meta":{"origin":255,"position":5},"title":"WordPress: Conditional tag to check a specific menu","author":"Pixel Insert \/ Pixert","date":"May 22, 2013","format":false,"excerpt":"Following conditional tag usually use in this filter function, wp_nav_menu_items [php]if( $args->theme_location == 'primary' )[\/php] \u00a0 [php]if( $args->theme_location == 'secondary' )[\/php] \u00a0 [php]if( $args->theme_location == 'primary' )[\/php] For an example, I want to add search box to Primary Menu in WPZOOM theme name Videozoom. Conditional tag above make sure the\u2026","rel":"","context":"In &quot;Code Snippet&quot;","block_context":{"text":"Code Snippet","link":"https:\/\/pixert.com\/blog\/category\/code-snippet\/"},"img":{"alt_text":"wordpress-logo-notext-rgb","src":"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2013\/08\/wordpress-logo-notext-rgb.jpg?resize=350%2C200","width":350,"height":200},"classes":[]}],"jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/pixert.com\/blog\/wp-json\/wp\/v2\/posts\/255","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pixert.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pixert.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pixert.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pixert.com\/blog\/wp-json\/wp\/v2\/comments?post=255"}],"version-history":[{"count":0,"href":"https:\/\/pixert.com\/blog\/wp-json\/wp\/v2\/posts\/255\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/pixert.com\/blog\/wp-json\/wp\/v2\/media\/200"}],"wp:attachment":[{"href":"https:\/\/pixert.com\/blog\/wp-json\/wp\/v2\/media?parent=255"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pixert.com\/blog\/wp-json\/wp\/v2\/categories?post=255"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pixert.com\/blog\/wp-json\/wp\/v2\/tags?post=255"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}