Sync with a Page / Gallery

This article is difficult to name properly but basically, you are here because you would like to sync your collection of photos in Lightroom with a certain (type of) page on your website and/or a gallery.

How WP/LR Sync works

First, let’s recap what the plugin does. WP/LR Sync uploads and keeps your photos synchronized with the Media Library. This is its main function. The plugin uses WordPress naturally, without hacking it, in order to be 100% compatible with all the WordPress processes.

WP/LR Sync does two more things, a bit less obvious:

  • it keeps the hierarchy of folders and collections in its own database in your WordPress, and make it accessible to developers. Therefore, if any plugin or theme wants to get this info, it can.
  • it shares with other plugins/themes events about the synchronization. For instance, such events are: a folder is created, a collection is added to it, an image is added (or updated) to a certain collection, another one being deleted, etc. Any other plugin or theme can react based on those events.

Now, you can link a collection with a gallery shortcode or you can link through a clever process all this data to your WordPress through WP/LR Sync Extensions. Or maybe you are using one of the Gallery Systems available.

Standard WP Gallery

The standard WP Gallery is the one using the shortcode “gallery” and included with WordPress from the start. To use it with WP/LR Sync, it is very simple. Visit the menu called “Collections & Keywords” under WP/LR Sync in your WordPress. By hovering with your mouse over your collections and keywords, the plugin will generate a little shortcode on the right side. You can simply copy/paste it and insert it somewhere on your website.

Sync with Galleries

Don’t worry if the WordPress Post Editor can’t display the images right away in the preview. It does it when the page is generated, so visit it directly. Any images added to your collection in Lightroom will be automatically part of this without any updated required (except maybe caching).

This process is totally natural to WordPress and a gallery such as the Meow Gallery can make it even prettier (or any other gallery system that is using WordPress naturally).

Meow Gallery

WP/LR Sync Extensions

This kind of page should be called a post-type. A post-type can be a post (standard), a page (standard), a portfolio, an album or whatever else. Those pages are defined by your theme, sometimes by other plugins. The way they exactly work is only known by that theme or plugin.

Between WP/LR Sync and your Theme

You probably now understand that there is no direct natural link between a collection and a page on your website. They have nothing in common. But WP/LR Sync has data (and events) that can be used to sync more things on your website. Of course, WP/LR Sync can’t guess how the data should be used or what should be done since all the themes are different.

This glue between WP/LR Sync and Themes is made through the WP/LR Extensions. You can check on the subject here.

Extensions

Developers or Theme Developers can make their own extension for WP/LR Sync. That would be the easiest for the users, but they often don’t know WP/LR Sync yet or don’t have any time to allow to make one.

I made a generic extension called Post Types that covers most of the themes. It basically works with all the themes handling galleries, portfolios, posts or other post-types in a natural WordPress way. You can check the information and tutorial about it here: Post Types Extension.

3. Gallery Systems (NextGen, FooGallery, etc.)

There are many gallery systems available, more or less old and more or less using WordPress naturally. Prefer systems which are using the Media Gallery in a natural way, to avoid issues in the future.

NextGen

NextGen is unfortunately not working at all naturally with WordPress, and therefore, you will not be able to easily link your collections to the NextGEN galleries through WP/LR Sync. NextGen is not even using the Media Library. You can import images to their system from the Media Gallery through another plugin (Media Library Importer for NextGEN), but that is extremely dirty. One day, if you move to a nice theme, a different gallery system, or simply the natural WordPress Gallery system, all your work will be lost. I made an extension for NextGEN in the past and it worked, but it’s too much work to keep it up and I don’t think it worth it. If you are interested, it is on GitHub.

FooGallery

A better example is FooGallery. It doesn’t use the WP Gallery, it creates its own shortcode but works naturally with WordPress and the Media Library. You can have WP/LR Sync synchronized with the FooGallery using the Post Types extension with those settings:

  • Post Type: foogallery
  • Mode: Array in Post Meta
  • Post Meta: foogallery_attachments

And Others…

In all cases, WP/LR Sync will always synchronize with your WordPress and your Media Library whatever system you are using, and you will be always able to use and create galleries through the previously discussed processes in the future if you wish.

If you have any further questions, please feel free to ask me below in the comments. Thank you 🙂

I recommend you to use WPEngine or SiteGround. They are both excellent hosting services and work perfectly with all my plugins.