Hi All, back to some wordpress topics today we are going to dive that how we can add Photo Gallery using WordPress without using any wordpress Plugin. The Photo gallery will include below 3 main features every gallery should have :
1. Fully customizable css
2. Open images using nice zoom effect
3. Add slideshow to scroll images
Let’s start with simple steps.
Create a sample Page named My Gallery
Add a shortcode [ gallery ] to content (without spaces) & click on Publish button.
Now you will see a box with photo icon in the middle in the page content. click on it. Now you will see a small image icon on top-left corner. click on that icon.
Now Media manager box will pop-up. Start adding as many images you want for the gallery & click Save all changes.
Next you will see thumbnails of all the images you uploaded & below it, there will be some settings related to gallery as below.
1. Link thumbnail to –
A.Media file B. Attachment Page
Here if we select Image file, it will make a link to the image file. so when we click on the image link, it will open that image directly And if we select the second option which is Attachment, it will make a link to a separate page on the same site which will open the image in page
2.Order images by – This setting will be used to arrange the order of the images under the Gallery
3.Order Based on the 2nd option, here in this option we will be able to set the Order to Ascending or Descending.
4.Gallery Columns This will set the layout of the Gallery on site, it will show the images in the number of columns we set here.
Make the modifications in these settings as per your need & click on Update gallery settings and also Update page content .
Now check the page on your website, it will bring all images you uploaded but they must be not properly arranged. That is because we have not yet given any styles to the Gallery. Below is a general style for gallery, add it to you style.css file code & refresh the page again. You will see all the images arranged with nice borders.
Till this step. We have achieved a simple Photo gallery using just default features of wordpress. Now the next step is to add the Zoom effect & the Slideshow. Let us first add Zoom effect. We will need jquery pretty Photo plugin for this. As it is one of the best jquery plugin for Image zooming. Get it from here & upload it into your wordpress theme folder and Add the below code into header.php file.
Now what you need to do is that Save the header.php file & check My Gallery page in your browser. Now try to click on any image & you will see the Zoom effect on the image & also a nice set of of Slideshow options on the image. And its done. You can use these same steps on WordPress Posts.
So guys hows that? I Hope you find these steps very easy to follow. Click here for My Gallery for the demo.
Leave your comment if there is any question.