Social Gallery WordPress Plugin

Guide: Social Gallery Pages Customisation – Custom Page Templates

Guide: Social Gallery Pages Customisation – Custom Page Templates

Customising your Social Gallery Pages:

Common reasons to edit your Social Gallery Pages template:

  1. Your theme is very customised – by default Social Gallery Pages don’t look correct
  2. You want to add more functionality (perhaps add more share options?)

As requested from V2.1 you can now create your own custom “Social Gallery Page” templates. This is not for amateur web developers/designers and should be approached with the same caution as editing a theme manually via code. No support is given for this or responsibility assumed, any changes you make to your files is to be done entirely at your own risk. Please be careful. That being said v2.1+ has a nice in-built way of stopping you overwriting the default template file:

Step 1. Re-read the above paragraph – are you sure you want to change the template?

Step 2. Open your plugins directory find the directory /SocialGallery/templates/


Step 3. In /SocialGallery/templates/ will be a file named “single-social-gallery-image.php” – copy this to a new file entitled “custom-single-social-gallery-image.php” in the same directory

Step 4. Edit this file as you like, saving only over the “custom-single-social-gallery-image.php”


Step 5. Once finished editing make sure you back up this file!



Common Edit’s for Social Gallery Page Template

90% of all themes will work out of the box with Social Gallery, 8% will take a super simple edit of this file and 2% will need a little more work – at least that’s my guess. The only real problems that make these changes take a little time is when a theme maker doesn’t use standardised WordPress calls, classes or structure. Granted some themes are so off-the-wall that it’s necessary to negate these established systems – but still, every theme should be tweakable.

So assuming you want to make Social Gallery Pages fit better within your current theme – here’s the approach I take:

Step 1. Once you’ve done the 5 steps above and you have a file you can edit (should be “custom-single-social-gallery-image.php”) Open that up in your code editor.

Step 2. Open a page template from your existing theme – typically these are in your theme directory with a name like “content.php”, “page-template.php” or “page.php”

Step 3. Compare the two files – specifically look at the area’s in the Social Gallery Page template file that I’ve highlighted in green below (you can see the line numbers on the left which should  help.) – This is where your theme is likely to differ from the standard WordPress css classes and such.


Step 4. Copy any custom stuff around that area of code from your existing theme template into your “custom-single-social-gallery-image.php” – making sure it makes logical sense – don’t overwrite any of the Social Gallery php (unless you know what your’e doing!)

Step 5. Upload your new custom php template file into /SocialGallery/templates/ in your WordPress plugin directory and check your page out, all being well (and perhaps with a bit more tweaking) you should have an awesome Social Gallery Page like this.


Leave a Reply

Your email address will not be published. Required fields are marked *

©2012 Social Gallery Plugin - Please note: Social Gallery Plugin is in no way related to Facebook, Social Gallery is a Gallery Share Plugin for WordPress.