Add Facebook like button in NextGen Gallery images

if you want to add facebook like button in your each gallery image? then this code is yours….

  • First of all go to your site Dashboard and install nextgen gallery plugin and then go to your WordPress admin pages go to

Gallery > Options > Effects

Make sure you select JavaScript Thumbnail effect = shutter

  • From your dashboard go to plugins\nextgen-gallery\view folder and open file gallery.php

you find this code

<a href="<?php echo $image->imageURL ?>" title="<?php echo $image->description ?>"
<?php echo $image->thumbcode ?> >

now replace with this code

 
<a rel="gallery" href="<?php echo $image->imageURL ?>" title="&lt;div 
style=&quot;float:left;width:200px;&quot;&gt;&lt;iframe src=
&quot;http://www.facebook.com/plugins/like.php?
app_id=YOURFACEBOOKAPPID&amp;amp;href=<?php echo $image->imageURL ?>
&amp;amp;send=false&amp;amp;layout=standard&amp;amp;width=50&amp;
amp;show_faces=false&amp;amp;action=like&amp;amp;colorscheme=light
&amp;amp;font=segoe+ui&amp;amp;height=30&quot; scrolling=&quot;no&quot;
 frameborder=&quot;0&quot; style=&quot;border:none; overflow:hidden;
width:200px; height:30px;&quot; allowTransparency=&quot;true&quot;&gt;
&lt;/iframe&gt;&lt;/div&gt;" <?php echo $image->thumbcode ?>  >
 

i hope you you get the Facebook like button in your nextge-gallery each image.

so enjoy with this code….have fun…!!

About these ads

2 responses

  1. Hi I followed Your steps but it doesn’t work… no Facebook like button in image…. could you please tell me what I am doing wrong

  2. sorry 4 late reply… you can send me your code….i’ll definitely help you…!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Shaishtaz Code

Coders Zone

WordPress.com News

The latest news on WordPress.com and the WordPress community.

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: