{"id":259,"date":"2012-10-01T14:44:31","date_gmt":"2012-10-01T14:44:31","guid":{"rendered":"http:\/\/pixert.com\/blog\/?p=259"},"modified":"2012-10-01T14:44:31","modified_gmt":"2012-10-01T14:44:31","slug":"flickr-badges-open-new-window-jquery-way","status":"publish","type":"post","link":"https:\/\/pixert.com\/blog\/flickr-badges-open-new-window-jquery-way\/","title":{"rendered":"Flickr Badges Open New Window jQuery way"},"content":{"rendered":"<p>I recently added a Flickr Badge to a site and really loved everything about it except that there was no way to have it open the photos in a new window when they were clicked<br \/>\nFlickr badge looked like the following<br \/>\n&#8211; Username<\/p>\n<pre class=\"brush: php; title: Code Block; notranslate\" title=\"Code Block\">\r\n&lt;div id=&quot;flickr_badge_wrapper&quot;&gt;\r\n&lt;script type=&quot;text\/javascript&quot; src=&quot;http:\/\/www.flickr.com\/badge_code_v2.gnecount=10&amp;display=latest&amp;size=s&amp;layout=x&amp;source=user&amp;user=username&quot;&gt;&lt;\/script&gt;&lt;\/div&gt;\r\n<\/pre>\n<p>&#8211; Group<\/p>\n<pre class=\"brush: php; title: Code Block; notranslate\" title=\"Code Block\">\r\n&lt;div id=&quot;flickr_badge_wrapper&quot;&gt;\r\n&lt;script type=&quot;text\/javascript&quot; src=&quot;http:\/\/www.flickr.com\/badge_code_v2.gnecount=10&amp;display=latest&amp;size=s&amp;layout=x&amp;source=group&amp;group=group&quot;&gt;&lt;\/script&gt;\r\n&lt;\/div&gt;\r\n<\/pre>\n<p>The following script would loop back through all of the links within the div id &#8220;flickr_badge_wrapper&#8221; and change their &#8220;target&#8221; property to &#8220;_blank&#8221;. Add it to footer.php before <\/body><\/p>\n<pre class=\"brush: plain; title: Code Block; notranslate\" title=\"Code Block\">jQuery(&quot;#flickr_badge_wrapper a&quot;).attr(&quot;target&quot;,&quot;_blank&quot;);<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>I recently added a Flickr Badge to a site and really loved everything about it except that there was no way to have it open the photos in a new window when they were clicked Flickr badge looked like the following &#8211; Username &lt;div id=&quot;flickr_badge_wrapper&quot;&gt; &lt;script type=&quot;text\/javascript&quot; src=&quot;http:\/\/www.flickr.com\/badge_code_v2.gnecount=10&amp;display=latest&amp;size=s&amp;layout=x&amp;source=user&amp;user=username&quot;&gt;&lt;\/script&gt;&lt;\/div&gt; &#8211; Group &lt;div id=&quot;flickr_badge_wrapper&quot;&gt; &lt;script type=&quot;text\/javascript&quot; src=&quot;http:\/\/www.flickr.com\/badge_code_v2.gnecount=10&amp;display=latest&amp;size=s&amp;layout=x&amp;source=group&amp;group=group&quot;&gt;&lt;\/script&gt; [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":262,"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":[54,5],"tags":[116,117,89,115,39,6],"class_list":["post-259","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-code-snippet","category-wordpress","tag-flickr","tag-flickr-badge","tag-html","tag-jquery","tag-php","tag-wordpress-2"],"aioseo_notices":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2012\/10\/logo_jquery_215x53.gif?fit=215%2C53&ssl=1","jetpack_shortlink":"https:\/\/wp.me\/p1pvi1-4b","jetpack-related-posts":[{"id":222,"url":"https:\/\/pixert.com\/blog\/wpzoom-featured-category-widget-videozoom\/","url_meta":{"origin":259,"position":0},"title":"WPZoom Featured Category Widget with video for Videozoom theme","author":"Pixel Insert \/ Pixert","date":"April 6, 2012","format":false,"excerpt":"I made the following widget code to show Featured Category with Video embed code. The following widget works with Videozoom theme from WPZoom Open wpzoom-widgets.php in the functions folder of Videozom. \u00a0Add the following code at the bottom of the wpzoom-widgets.php [php] \/*---------------------------------------------*\/ \/* WPZOOM: Featured Category widget with Video\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":"","width":0,"height":0},"classes":[]},{"id":191,"url":"https:\/\/pixert.com\/blog\/how-to-add-pinterest-pin-it-to-wordpress\/","url_meta":{"origin":259,"position":1},"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":393,"url":"https:\/\/pixert.com\/blog\/add-facebook-like-box-change-language-local\/","url_meta":{"origin":259,"position":2},"title":"How to add Facebook Like Box and change language to local","author":"Pixel Insert \/ Pixert","date":"September 21, 2014","format":false,"excerpt":"Facebook Like Box\u00a0allows website owners to provide their visitors with an easy way to join their facebook community and get updates right in their Facebook news feed with a click to like from\u00a0their website. It\u00a0is\u00a0a good\u00a0way\u00a0to promote a \u00a0Facebook Page. Facebook Like Box only works for Facebook Pages, this isn't\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\/2014\/09\/facebooklikebox.jpg?fit=447%2C547&ssl=1&resize=350%2C200","width":350,"height":200},"classes":[]},{"id":105,"url":"https:\/\/pixert.com\/blog\/facebook-share-button\/","url_meta":{"origin":259,"position":3},"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":256,"url":"https:\/\/pixert.com\/blog\/exclude-featured-posts-from-wpzoom-featured-category-widget\/","url_meta":{"origin":259,"position":4},"title":"Exclude Featured Posts from WPZOOM: Featured Category Widget","author":"Pixel Insert \/ Pixert","date":"August 25, 2012","format":false,"excerpt":"Zenko WPZOOM Demo Site (see the documentation) I made customization to the widget to exclude Same Posts already been shown on Featured Slider to avoid duplication 1. Open featured-category.php in wp-content\/themes\/zenko\/functions\/theme\/widgets folder 2. Replace all code in featured-category.php with the following [code] <?php \/*------------------------------------------*\/ \/* WPZOOM: Featured Category widget *\/\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\/2012\/08\/zenkofeapostswidget.jpg?fit=580%2C459&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2012\/08\/zenkofeapostswidget.jpg?fit=580%2C459&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2012\/08\/zenkofeapostswidget.jpg?fit=580%2C459&ssl=1&resize=525%2C300 1.5x"},"classes":[]},{"id":255,"url":"https:\/\/pixert.com\/blog\/how-to-add-pinterest-button-on-wordpress-attachment-file\/","url_meta":{"origin":259,"position":5},"title":"How to add Pinterest Button on WordPress Attachment file","author":"Pixel Insert \/ Pixert","date":"August 1, 2012","format":false,"excerpt":"See How to Add Pinterest \"Pin It\" to WordPress for introduction Codes in article above may work for Posts, but there's a little tweak for Pinterest Pin It button on attachment.php to work [php] <div class=\"pinterest\"> <a href=\"http:\/\/pinterest.com\/pin\/create\/button\/?url=<?php the_permalink(); ?>&media=<?php echo wp_get_attachment_url(); ?>&description=<?php the_title(); ?> on <?php bloginfo('url'); ?>\" class=\"pin-it-button\"\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\/02\/pinterestlogo.png?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\/259","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=259"}],"version-history":[{"count":0,"href":"https:\/\/pixert.com\/blog\/wp-json\/wp\/v2\/posts\/259\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/pixert.com\/blog\/wp-json\/wp\/v2\/media\/262"}],"wp:attachment":[{"href":"https:\/\/pixert.com\/blog\/wp-json\/wp\/v2\/media?parent=259"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pixert.com\/blog\/wp-json\/wp\/v2\/categories?post=259"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pixert.com\/blog\/wp-json\/wp\/v2\/tags?post=259"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}