Forum Replies Created

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter macrobber69

    (@macrobber69)

    https://lpiincorporated.com/

    Just a sandbox for development.

    Thread Starter macrobber69

    (@macrobber69)

    Clever…I see what you are getting at here. I’m going to mark this as solved. Thanks Gennady, hacky is better than nothing!

    Thread Starter macrobber69

    (@macrobber69)

    It’s interesting though, while I agree there is no relation to the gallery, because (I assume) the shortcodes are placed into the page, the attachment page ‘knows’ both Next and Previous images to display. So, it is able to devine ‘some’ relationship – even if there is no connection. As I said, I assume this is gathered from the IDS in the shortcode [gallery ids="729,732,731,720"] and thought that maybe, I could simply grab those and parse them (iterate through for a count and match for a location). That was my thought at least. But as is with most things, it becomes a law of diminishing returns.

    Thread Starter macrobber69

    (@macrobber69)

    Part of the design for the customer is the single-image attachment page (heavily modified, of course). This approach allows me to modify images.php / pages.php to accommodate the design. I was hoping to use the default gallery approach as I have already been forced to use two separate plugins for images in other areas of the design. When I asked the question, I had no idea that wordpress was so obfuscated it would make a fairly simple design element so challenging to solve.

    Thread Starter macrobber69

    (@macrobber69)

    Having chased this rabbit down the hole for several hours, you are correct. It is a royal, unholy pain. The default gallery does not work as I would have expected. If I could poll the mysql database, I would – but that doesn’t appear to buy me much. After several hours, I decided that maybe I could just figure out how to grab the shortcode IDS from the page, iterate through them to at least give me a count. But honestly, that seems like a very clunky solution and, as you noted, order is not preserved. It is such a small element in the overall design I am executing [Image 3 of 10] but it has exhausted my desire to care.

Viewing 5 replies - 1 through 5 (of 5 total)