archetyped / simple-lightbox

The highly customizable lightbox for WordPress
http://archetyped.com/tools/simple-lightbox/
GNU General Public License v2.0
74 stars 33 forks source link

Classic vs Block, docs out of date #1037

Closed paleolith closed 11 months ago

paleolith commented 11 months ago

Description of Problem

As a new SLB user and mostly-new WP user, I'm having trouble with the "for noobs" docs, "How do I create an image link".

Details

Where it says

First, read through WordPress’ official documentation on inserting images into posts and pages. ... The key is the Image Link section in the aforementioned documentation. You need to make sure that this option is set to either Attachment Page or Media File before you insert the image into your post.

AFAICT, this applies to the Classic editor. I see nothing of the sort in the Block editor, and if I insert a Classic block, again the references option block is not present.

If I were already familiar with SLB, or more familiar with WP, I'd probably be able to guess what to do. (I have inserted an image, but SLB doesn't engage.) I know HTML a lot better than I know WP, and could just use the HTML editor if I knew what SLB is expecting.

Thanks for any and all help.

archetyped commented 11 months ago

I know HTML a lot better than I know WP, and could just use the HTML editor if I knew what SLB is expecting.

The section of the tutorial you pasted is titled "How do I create an image link?" This is what SLB is expecting.

The section directly before the part you pasted provides more detail:

SLB’s functionality hinges on links because there needs to be something on the page for users to click in order to display the lightbox. Specifically, SLB works with links to media such as images. If you have a link to a PNG, JPEG, GIF image file in a post, then SLB will load it in a lightbox rather than force the user to load a completely new page just for the image.

If you're familiar with HTML, then creating an image link should be fairly straightforward. If it's not, here's an example:

<a href="url-to-image.png">Link text (or thumbnail image, etc.)</a>

Alternatively, documentation for inserting images with WordPress' block editor is in the same section of WordPress' documentation as the Classic editor documentation. I've also updated the tutorial with links to documentation for both editors for future reference 👍🏽.