{"id":509,"date":"2023-06-29T09:34:00","date_gmt":"2023-06-29T09:34:00","guid":{"rendered":"https:\/\/www.micha.name\/blog\/?p=509"},"modified":"2025-05-16T07:03:35","modified_gmt":"2025-05-16T07:03:35","slug":"wordpress-and-piwigo-yes-please","status":"publish","type":"post","link":"https:\/\/www.micha.name\/blog\/2023\/06\/29\/wordpress-and-piwigo-yes-please\/","title":{"rendered":"WordPress and Piwigo? Yes please!"},"content":{"rendered":"\n<p>So I just discovered the <a rel=\"noreferrer noopener\" href=\"https:\/\/wordpress.com\/plugins\/piwigopress\" data-type=\"URL\" data-id=\"https:\/\/wordpress.com\/plugins\/piwigopress\" target=\"_blank\">PiwigoPress<\/a> plugin for WordPress.<br>While it&#8217;s obsolete and the widget no longer works, the &#8220;short code&#8221; feature still does. Unfortunately it&#8217;s not very well documented, but it is possible to add pictures to an article which link back to not only the picture, but also the album which that picture is part of.<br>Yayy.<\/p>\n\n\n\n<p>Trawling through the <a href=\"https:\/\/github.com\/norbusan\/piwigopress\/blob\/master\/piwigopress.php\" data-type=\"URL\" data-id=\"https:\/\/github.com\/norbusan\/piwigopress\/blob\/master\/piwigopress.php\">source code<\/a>, it seems the following is possible:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#091;PiwigoPress id={&lt;pic_id&gt;,&lt;pic_id&gt;,...} lnktype=albumpicture url='http:\/\/gallery.lemmurg.com\/']<\/code><\/pre>\n\n\n<span class=\"collapseomatic \" id=\"id6a1dbdada3ae4\"  tabindex=\"0\" title=\"Expand Parameters Table\"    >Expand Parameters Table<\/span><div id=\"target-id6a1dbdada3ae4\" class=\"collapseomatic_content \">\n\n\n\n<figure class=\"wp-block-table is-style-stripes\"><table class=\"has-subtle-pale-blue-background-color has-background\"><tbody><tr><td>id<\/td><td>Piwigo picture id(s)<\/td><td>eg. <br>id=1 &#8211; picture id 1<br>id=1-5 &#8211; all pictures with ids 1 through 5<br>id=1,3,4 &#8211; pictures with ids 1, 3, and 4<\/td><\/tr><tr><td>lnktype<\/td><td>picture (default, link to picture only)<br>album (?)<br>albumpicture (link to picture with album)<\/td><td>eg lnktype=albumpicture<\/td><\/tr><tr><td>url<\/td><td>URL of the Piwigo site<\/td><td>eg: url=http:\/\/gallery.lemmurg.com<\/td><\/tr><tr><td>size<\/td><td>Size of the picture. Possible values:<br>sq &#8211; square<br>th &#8211; thumbnail<br>xs &#8211; extra small<br>sm &#8211; small<br>me &#8211; medium<br>la &#8211; large (default)<br>xl &#8211; extra large<br>xx &#8211; extra-extra large<br><br><\/td><td>eg: size=sm<\/td><\/tr><tr><td>name<\/td><td>Adds image name<br>0 &#8211; no (default)<br>1 &#8211; yes<br>auto &#8211; ?<\/td><td>eg: name=1<\/td><\/tr><tr><td>desc<\/td><td>Adds image description.<br>0 &#8211; no (default)<br>1 &#8211; yes<\/td><td>eg: desc=1<\/td><\/tr><tr><td>class<\/td><td>?<\/td><td><\/td><\/tr><tr><td>style<\/td><td>?<\/td><td><\/td><\/tr><tr><td>lnktype<\/td><td>picture &#8211; link to picture only (default)<br>albumpicture &#8211; link to picture with album<br>album &#8211; ?<\/td><td>example: lnktype=albumpicture<\/td><\/tr><tr><td>opntype<\/td><td>Whether to open in the current tab or a new one.<br>_blank &#8211; open in new tab (default)<br><\/td><td><\/td><\/tr><tr><td>ordertype<\/td><td>?<br>random &#8211; random order (default)<br><\/td><td><\/td><\/tr><tr><td>orderasc<\/td><td>Whether to sort pictures in ascending order.<br>0 &#8211; no (default)<br>1 &#8211; yes<\/td><td><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n<\/div>\n\n\n\n<p>Additionally, it&#8217;s possible to control the layout of the embedded pictures by providing custom CSS for <code>PiwigoPress<\/code> tags as follows:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">.PiwigoPress_photoblog {\n      display:inline-block;\n      padding-right:10px;\n }\n .PWGP_shortcode {\n      display:inline-block;\n }<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>So I just discovered the PiwigoPress plugin for WordPress.While it&#8217;s obsolete and the widget no longer works, the &#8220;short code&#8221; feature still does. Unfortunately it&#8217;s not very well documented, but it is possible to add pictures to an article which link back to not only the picture, but also the album which that picture is part of.Yayy. Trawling through the source code, it seems the following is possible: Additionally, it&#8217;s possible to control the layout of the embedded pictures by providing custom CSS for PiwigoPress tags as follows: .PiwigoPress_photoblog { display:inline-block; padding-right:10px; } .PWGP_shortcode { display:inline-block; }<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[29],"tags":[12,95,37,94],"_links":{"self":[{"href":"https:\/\/www.micha.name\/blog\/wp-json\/wp\/v2\/posts\/509"}],"collection":[{"href":"https:\/\/www.micha.name\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.micha.name\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.micha.name\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.micha.name\/blog\/wp-json\/wp\/v2\/comments?post=509"}],"version-history":[{"count":7,"href":"https:\/\/www.micha.name\/blog\/wp-json\/wp\/v2\/posts\/509\/revisions"}],"predecessor-version":[{"id":703,"href":"https:\/\/www.micha.name\/blog\/wp-json\/wp\/v2\/posts\/509\/revisions\/703"}],"wp:attachment":[{"href":"https:\/\/www.micha.name\/blog\/wp-json\/wp\/v2\/media?parent=509"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.micha.name\/blog\/wp-json\/wp\/v2\/categories?post=509"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.micha.name\/blog\/wp-json\/wp\/v2\/tags?post=509"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}