Headway Themes — The Drag & Drop WordPress Theme

WordPress Tips

How to Add Multiple Galleries in a WordPress Page?

I believe you might have seen some WordPress gallery where the authors dumped all the images or photos in the gallery page without any organization. If the visitors need to find certain image, they might have to go through the entire gallery to do it. It is highly recommended that if you could group your images or photos into several categories in a page for better presentation. You can label them with relevant titles so that it will be neater and easier for your visitors to browse and navigate around. For example, the WordPress gallery might include multiple categories such as products, events and promotion.

However, WordPress does not support multiple categories in a gallery so the trick is to create a main gallery page and a few gallery pages then have these pages link back to the main page. A good example will be a gallery page showcases a restaurant’s menu. It will have 4 categories showing the appetizers, main dishes, drinks and desserts. Below are the steps to do it.

  1. Go to your WordPress dashboard and create a new page for your gallery.
  2. This page will be used as the main page for your gallery.
  3. Inside the text editor, type in the title of page and insert the first category gallery, in this case which is the Appetizers.
  4. Click on the “Add Media” icon and click on “Select Files” to import the group of images for the Appetizers.
  5. Once you are done, click on the tab “HTML” at the text editor and you should the code as below.
    <strong>Appetizers</strong>
    [
    		
    		
    
    
    ] 
  6. Below the code, type in the other three titles – Main Dishes, Drinks and Desserts.
  7. Now go ahead and click on “Add Page” to create the other 3 gallery pages which are the “Main dishes”, “Drinks” and “Desserts”.
  8. In the individual 3 pages, repeat step 4 to import the images.
  9. Copy the short code of these three pages and insert into the main page as below.
    <strong>Appetizers</strong>
    [
    		
    		
    
    
    ]
    
    Main Dishes
    [
    		
    		
    
    
    ]
    
    Drinks
    [
    		
    		
    
    
    ]
    
    Desserts
    [
    		
    		
    
    
    ]
    
  10. In order for the page to know which gallery it is linking to, you need to provide the ID of the page.
  11. You can click on “Pages” and from the list of pages, hover over the page you want to get ID and at the bottom of the screen, you can see something as below at the status bar.
    mydomain.com/wp-admin/post.php?post=680&amp;action=edit
  12. Hover over the 3 pages for “Main dishes”, “Drinks” and “Desserts” and take down the IDs.
  13. Add the 3 IDs into the code as below.
    <strong>Appetizers</strong><strong></strong>
    [
    		
    		
    
    
    ]
    
    <strong>Main Dishes</strong>
    [
    		
    		
    
    
    ]
    
    <strong>Drinks</strong>
    [
    		
    		
    
    
    ]
    
    <strong>Desserts</strong>
    [
    		
    		
    
    
    ]
    
  14. Once it is done, save the file and preview.
  15. You could see the gallery page is now categorized neatly with 4 titles and the relevant images are grouped under the respective titles.

You have now created multiple mini galleries in a page. Hopefully, in the future release of WordPress, there is a better way to manage the gallery and we can save the effort to create so many pages. If you have a better idea, please feel free to leave your comment below.

Another Way to add HTML Table Easily to Your WordPress Post

Those of you who are used to coding HTML table in html editors might find it is such a pain to do it in WordPress. Although there are plugins, for example the WP-Table-Reloadedavailable for creating table in WordPress but it is not as friendly as it should be. In my previous post, “How to CreateRead More




How to Create Multiple Databases for Multiple WordPress Installation

Recently, a visitor asked how to have multiple databases while installing different wordpress in one of my posts titled “Installing Second Copy of WordPress in Sub-domain Directory”? So in this post, I will try to describe the steps involved in creating another database for another wordpress installation. If you are wondering why you need anotherRead More




Difference between Add Image and Add Media to WordPress Blog?

If you are new to using WordPress, you might confuse between adding an image and adding media or gallery to your wordpress page or post. There is a difference between these two features. Add Image The “Add Image” feature is quite straightforward as it places image in your page or post. If you are placingRead More




Unable to Upload Files to WordPress Sub-directories after Migration

I have finished developing a site in a test sub-directory and am ready to move to the actual sub-domain. I specially purchased BackupBuddy from iTheme to help me with the migration as I read a lot of positive comments about this plugin. It is said to be one of the foolproof ways to migrate oneRead More




Installing Second Copy of WordPress in Sub-domain Directory

At times, you may need to have another WordPress site besides the main WordPress site at your root directory, for example, another WordPress site for your sub-domain. If you are contemplating whether you can install the WordPress directly into your sub-domain directory to do your design and development works while keeping the current static website,Read More




How to Add a Static Home Page to a Blog?

If you have already have a blog but then decided to add in some static pages to make it look like a normal website. Can you do that? Or, you are thinking to move your blog from root directory to a new directory called “blog” and the default home page is a static page withRead More




Easier Way to Redirect Your Site Permanently

What is the fastest and easier way to redirect your site permanently? Technically speaking, doing a 301 redirect of your site will help to maintain your search ranking in search engines without showing your visitors a 404 page error. Your visitors will redirect to a new URL even though they have clicked on the oldRead More




How to Create Tables Easily for Your WordPress Blog?

If you are trying to create a table for your wordpress page, it could be really tedious and painful. Generally, people including myself will use a html editor to code the table separately before copying the code into the wordpress page then use a CSS stylesheet to control its look. Fortunately, I learnt about aRead More