Thanks for your update and your interest in the [mla_gallery]
“media page” alternative.
First, you wrote “I could also reconsider my current theme …” I regret that I have not spent much time with WordPress themes and do not have a recommendation. I am a plugin/”plumber” kind of person, not a theme/”painter” type.
It should be straightforward to add the [mla_gallery]
“media page” to your existing theme. You can read through the “Support for Alternative Gallery Output, e.g., Pagination” section of the Settings/Media Library Assistant Documentation tab to see what’s possible. In particular, the second example in that section does what you want. Here is that part of the Documentation:
Here is a more complete example of two standard WordPress pages, “Sample Gallery” and “Single Sample”, that work together. The “Sample Gallery” page displays a gallery of all items assigned to the Att.Tags “sample” term. The “Single Sample” page displays the full-size image for a “sample” item and has links to move back and forth through all the items assigned to the term. The Sample Gallery page contains:
[mla_gallery attachment_tag="sample" mla_caption="{+title+}" mla_link_href="/single-sample/?current_id={+attachment_ID+}&attachment_tag={+query:attachment_tag+}"]
In this example /single-sample/
, the URL portion of the link, is the “Permalink” WordPress generates from the page title. If your Permalink structure is different you will have to adjust this element. Note the use of attachment_tag={+query:attachment_tag+}
in the href to pass the tag value from the gallery page to the Single Sample page. The Single Sample page has three [mla_gallery]
shortcodes; one to display the image and two for the “Previous Sample” and “Next Sample” links:
[mla_gallery columns=1 ids="{+request:current_id+}" size=medium]
<div style="clear: both; float: left">
[mla_gallery mla_output="previous_link,wrap" mla_link_text='← Previous Sample' attachment_tag="{+request:attachment_tag+}" id="{+request:current_id+}" mla_rollover_text="{+title+}" mla_link_href="{+page_url+}?current_id={+attachment_ID+}&attachment_tag={+query:attachment_tag+}"]
</div>
<div style="float: right">
[mla_gallery mla_output="next_link,wrap" mla_link_text='Next Sample →' attachment_tag="{+request:attachment_tag+}" id="{+request:current_id+}" mla_rollover_text="{+title+}" mla_link_href="{+page_url+}?current_id={+attachment_ID+}&attachment_tag={+query:attachment_tag+}"]
</div>
Consider the following points:
- The “ids” parameter in the first
[mla_gallery]
takes the “current_id” value (for the single image to be displayed) from the link’s query arguments (in the PHP $_REQUEST array). This is passed from the Sample Gallery page and updated in the previous/next link.
- The “id” parameters in the second and third
[mla_gallery]
take the “current_id” value from the $_REQUEST array. In these “galleries” the “current_id” is the item from which “previous” and “next” are calculated.
- The “attachment_tag” parameters in the second and third
[mla_gallery]
take the their value from the $_REQUEST array as well. The Att. Tag value is used to reconstruct the original gallery for the previous/next calculation, keeping the navigation within the bounds of the selected term.
This example shows the power of the substitution parameters and in particular the “query” and “request” prefixes that can be used to pass information into an [mla_gallery]
and from one page to the next.
That should get you started on adapting the idea to your application. I will leave this topic unresolved until I hear back fro you.