Thanks for the kind words and for your further information.
You wrote “… the entire form, including the input box and the button disappears.” That is very odd. I would have to see this problem in action to investigate further. I hope it will be resolved with the solution proposed below.
Thanks as well for your patience while I worked out some improvements required to support your application. I found and fixed a few minor bugs in the existing MLA code and added a new muie_keyword_parameter
to the “MLA UI Elements Example” plugin’s [muie_keyword_search]
shortcode. The example plugin includes a Settings/MLA UI Elements page with a Documentation tab that explains everything.
Here is an example you can adapt. It contains two “search form and gallery” sets which will retain their settings across page refreshes.
<h3>MUIE multiple forms and galleries</h3>
<form id="mla-search-form-1" action="." method="post">[muie_keyword_search muie_keyword_parameter=form-1] <input id="submit" name="submit" type="submit" value="Search" />
[mla_gallery]
mla_page_parameter=gallery_pictures
muie_keyword_parameter=form-1
post_parent=all attachment_category=abc add_filters_to=any posts_per_page=1
mla_caption="{+title+}"
[/mla_gallery]????
<p> </p>
<div style="float: left;">
[mla_gallery]
mla_page_parameter=gallery_pictures
muie_keyword_parameter=form-1
post_parent=all attachment_category=abc add_filters_to=any posts_per_page=1
mla_output="previous_page,first"
mla_link_text='← Previous Gallery Page' mla_rollover_text="Previous or first page for this tag"
[/mla_gallery]</div>
<div style="float: right;">
[mla_gallery]
mla_page_parameter=gallery_pictures
muie_keyword_parameter=form-1
post_parent=all attachment_category=abc add_filters_to=any posts_per_page=1
mla_output="next_page,last"
mla_link_text='Next Gallery Page → ' mla_rollover_text="Next or last page for this tag"
[/mla_gallery]</div>
<h4> <br />Second form and gallery</h4>
<p>[muie_keyword_search muie_keyword_parameter=form-2] <input id="submit" name="submit" type="submit" value="Search" /></p>
</form>
<p>[mla_gallery] mla_page_parameter=gallery_pictures_2 muie_keyword_parameter=form-2 post_parent=all attachment_category=abc add_filters_to=any posts_per_page=1 mla_caption="{+title+}" muie_debug=log [/mla_gallery]</p>
<div style="float: left;">[mla_gallery] mla_page_parameter=gallery_pictures_2 muie_keyword_parameter=form-2 post_parent=all attachment_category=abc add_filters_to=any posts_per_page=1 mla_output="previous_page,first" mla_link_text='← Previous Gallery Page' mla_rollover_text="Previous or first page for this tag" muie_debug=log [/mla_gallery]</div>
<div style="float: right;">[mla_gallery] mla_page_parameter=gallery_pictures_2 muie_keyword_parameter=form-2 post_parent=all attachment_category=abc add_filters_to=any posts_per_page=1 mla_output="next_page,last" mla_link_text='Next Gallery Page → ' mla_rollover_text="Next or last page for this tag" muie_debug=log [/mla_gallery]</div>
There is one HTML form spanning both of the [muie_keyword_search]
shortcodes and their Submit buttons. This ensures that both of the search values are “sticky” regardless of which Submit button is clicked. Each [muie_keyword_search]
shortcode has a unique muie_keyword_parameter
value, and the same value is entered in all three of the [mla_gallery]
shortcodes for the gallery and navigation sontrols. You can change the attachment_category
and posts_per_page
parameters to suit your application.
I have uploaded a new MLA Development Version dated 20220424 that includes an updated “MLA UI Elements Example” plugin. You can find step-by-step instructions for using the Development Version in this earlier topic:
PHP Warning on media upload with Polylang
Once the Development Version is installed you must install and activate the example plugin. Navigate to the Settings/Media library Assistant Documentation tab and click the “Example Plugins” button. Type “UI” in the text box and click “Search Plugins” to filter the table.
You are looking for the “MLA UI Elements Example” plugin. Make sure it is the latest version, 2.02. Find that plugin and hover over the title in the left-most column. Click the “Install” rollover action, then go to the WordPress Plugins/Installed Plugins submenu and activate the example plugin as you would any other plugin.
Once the Development Version and new example plugin are installed and active you can compose a multi-gallery page along the lines of the example above.
This updated example plugin will be part of my next MLA version, but in the interim it would be great if you could install the Development Version and the example plugin and let me know if it works for you. Thanks for inspiring this MLA improvement.