Tips, Tricks & How-Tos
-
Showing all EXIF/meta data for an image
When images are uploaded to WordPress/Sunshine, most of the EXIF data is saved to the database. By default, Sunshine does not use this for anything except for searching but it is also available to use for display with custom code. Here is an example of showing all available meta data for a single image: View […]
-
Show related images in single image view
This code snippet will show random other images from the same gallery when viewing a single image. Please note this will not work with Lightbox. View the code on Gist.
-
Keeping images out of Google search results
Please know: The moment you put any image online, it can be available to the entire internet. The only true way to protect an image is to never put it online in the first place. A few Sunshine users have found that client images end up in Google’s search results. After digging, we found that […]
-
Customize text in Sunshine
As of writing this, there are over 3,000 strings of text throughout Sunshine and all the add-ons. Having a built-in tool for customizing every string isn’t feasible. However, the great thing about WordPress is its vast plugins like Loco Translate which is a perfect solution to handle customizing strings in Sunshine, or any other plugin/theme, […]
-
Don’t let clients see other galleries
Some photographers want to setup Sunshine so their clients can only see their own gallery and not any others. There are a couple ways to do this. Gallery Type: Private You can set each gallery to Private which means only the users assigned to the gallery can view it and it will be hidden from […]
-
Selling Videos
Sunshine is not really geared towards selling videos but there is a workaround with a small known feature of the Digital Downloads add-on.
-
Enabling error logging
Often times we need to see what PHP errors are appearing in order to help identify an issue with Sunshine on your site. WordPress makes this pretty easy to enable. Find your wp-config.php file and add the following code: define( ‘WP_DEBUG’, true );define( ‘WP_DEBUG_LOG’, true );define( ‘WP_DEBUG_DISPLAY’, false ); This will enable debug mode and […]
-
Remove the Register and Login links
Using WordPress filters, we can modify which links appear in Sunshine’s Main Menu. You can either add some PHP code to your functions.php file (or use the plugin Code Snippets) to entirely remove the links or use CSS to hide the links.
-
Show captions under thumbnails and single images
For custom code like the samples below, it is recommended to add it with a plugin like Code Snippets so as not to edit any important core files in WordPress, Sunshine Photo Cart, or your theme. Show caption with thumbnails Sunshine has an option to show the image name under the thumbnails in the Gallery view. […]
-
Make a product only available in a package
Some users have wanted to make specific products only available in a Package and not available for individual purchase. Packages do require that you only use existing products. However, in Sunshine any product that does not have a price (left blank) is not available for purchase. If you set a price to “0”, then it is offered […]