Since Backlight was introduced, once in a while users asked for more advanced form features such as radio buttons and drop-down lists. Backlight’s contact form editor is easy to use, but only supports text input. These forms are really just intended for simple contact forms. For more advanced forms, it is recommended to use WordPress […]
Get recent blog posts outside of WordPress pages
On my photography site, I display a list of the last 5 blog posts in the footer on all pages. I use the rss feed to get the most recent posts outside of the wordpress environment. This is how I do it using phplugins: And then I can call $this->dlp_get_latest_blog_posts(10, ‘my-link’) wherever I would like […]
Better use of metadata for single image pages
Backlight2 provides the option to access certain image metadata using `Metadata One`, `Metadata Two` and the `Tokens` field. This limits creators who need to access more metadata to provide additional information to the user. Using additional metadata might increase SEO as well. In this example, I use `Metadata One` which can be found in Backlight […]
Customizing single-page view
The single-page view is a bit of a neglected child. Its main purpose is to provide a static link to an image that can be easily shared on social media. But there is more! With Backlight 2 and later, the internal classes photo and album are exposed now.
Adding breadcrumbs to non-gallery pages (updated August 2020)
Updated August 2020: I now use the newer Schema.org vocabulary for the breadcrumbs structure instead of the now obsolete data-vocabulary.org. For consistency reasons with my other phplugins tips&tricks, I renamed the my_crumb() helper function. It is now called dlp_my_crumb(). Updated August 9, 2020: Added support for backlight/search. Backlight provides the option to use breadcrumbs on […]
Using Markdown with Phplugins
It couldn’t be simpler than that: Or you can have text that spans several lines: Or you can assign text to a variable and then output that content using the Markdown parser: This last examples shows as well how you could add text to an already existing variable. Please note that this will not work […]