Hi all
I'm running the latest Wordpress version and there I have installed Piwigopress.
I'm also running the latest version of Piwigo in a separate directory alongside the Wordpress directory. This is all working fine and I can link back and forth between the two scripts.
In the Wordpress sidebar Piwigopress is producing working links to my Piwigo albums, random pics, etc. These are just words, e.g. Random, but not images. When I click the link on the Wordpress site I get the correct Piwigo album. Works perfectly.
But I can't get Piwigopress to generate thumbnails of Piwigo images in the Wordpress sidebar widget. Maybe I am misunderstanding what Piwigopress does? I think it is supposed to produce images (thumbnail links) in the Wordpress sidebar, but if that is right it is not happening in my case.
Does anyone have any tips as to how to get Piwigo images to appear in the Wordpress sidebar?
Thanks in advance
Peter
Offline
Subscribed to topic, wanting to use Piwigo with Wordpress myself.
Anybody that has tips or has done it successfully please post.
Offline
I have not fooled around with PiwigoPress, but I'm aware there is a plugin where you can insert your own header. ERGO, you can add your WP header content and at least the piwigo install will look like the rest of your website. You'll likely have some CSS edits/additions to make as well for the best match.
There is Fancy Footer too:
https://piwigo.org/ext/extension_view.php?eid=862
Also there is PiwiShack. Piwishack provides codes for integration of thumbnails, images and/or links in a forum, a site or a blog. Codes are displayed in a popup window, with a sheet for HTML code, a sheet for BBcode and a sheet with specific codes (can be customised by the administrator).
https://piwigo.org/ext/extension_view.php?eid=324
I'll have to check out PiwigoPress and see how it behaves in one of my Divi themed WordPress websites.
Offline
peterpix wrote:
Does anyone have any tips as to how to get Piwigo images to appear in the Wordpress sidebar?
If your Wordpress and Piwigo are in the same domain, then is quite easy.
The tips are in this topic https://piwigo.org/forum/viewtopic.php?id=22014 code samples made by me (in Vanilla JS) and teekay (jQuery JS lib) to work with Piwigo api and get the latest images for example.
I do not use Wordpress 5. But on Wordpress 4 you just login as admin and go to Administration=>Appearance=>Widgets. Drag a "Custom Html" widget on sidebar, and write some similar code with the one in the topic above. Example:
<div id="pwg_imgs"></div> <script type="text/javascript"> var pwg_api = 'http://yoursite.com/piwigo/ws.php?format=json&method=pwg.categories.getImages&per_page=4&order=date_available%20desc'; var pwg_div = document.getElementById('pwg_imgs'); var pwg_xhr = new XMLHttpRequest(); pwg_xhr.open('GET', pwg_api); pwg_xhr.onload = () => { if (pwg_xhr.status == 200) { var pwg_images = JSON.parse(pwg_xhr.responseText).result.images; pwg_images.forEach(img => pwg_div.innerHTML += '<a href="'+img.page_url+'"><img src="' + img.derivatives.square.url + '" width="64"/></a>'); } }; pwg_xhr.send(); </script>
Last edited by eliz82 (2020-04-10 07:00:12)
Offline
In the widget settings:
1. Make sure you have the correct external gallery URL
2. Set a size (like medium)
3. Set a link type (picture page in album)
4. Sort order (random)
5. Since x months = 0
6. Album ID = 0
7. Number of pictures = 2 (or anything > 0)
Works as intended for me with these settings.
Offline