Thanks for your update with the additional information and especially for the links to your annotated screen shots; very helpful. Thanks as well for your patience while I travelled and your offer for extra payment. I no longer accept donations for the plugin or support work; it is my gift to the WordPress community.
I have been able to work out a solution along the lines you suggested. During my research I came across this earlier topic quite similar to yours:
Only Show Tags from Specific Attachments in Specific Categories
The solution for that topic included an enhancement to the core MLA code and did not require an additional custom plugin. I was able to extend the earlier work to meet your requirements, but it required a couple of additions to the MLA code and some enhancements to the “MLA UI Elements Example” plugin.
I have uploaded a new MLA Development Version dated 20190330 that contains the changes required for your application. 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 update the example plugin to the latest version, 1.11. To update the example plugin, navigate to the Settings/Media library Assistant Documentation tab and click the “Example Plugins” button. Type “elements” in the text box and click “Search Plugins” to filter the table.
You are looking for the “MLA UI Elements Example” plugin. Find that plugin and hover over the title in the left-most column. Click the “Update” (or “Install”) rollover action, then go to the WordPress Plugins/Installed Plugins submenu and verify or activate the example plugin as you would any other plugin.
Once the updates are installed you can change your form and shortcodes to something like this:
<form id="attachment-category-form" method="post" action=".">
<p style="margin-top:20px; margin-bottom:3px;">
Cerca in base alla fonte del documento:
<div class="searchlist">
[mla_gallery attachment_category=page-1 mla_control_name=tag_dropdown mla_item_parameter=current_attachment_tag post_mime_type=application/pdf taxonomy=attachment_tag mla_output=dropdown use_filters=true option_all_text=All option_all_value=all show_count=true mla_option_value={+slug+} mla_alt_shortcode=mla_term_list]
</div>
</p>
<p style="margin-top:20px; margin-bottom:3px;">
Cerca in base a una parola chiave
<div class="searchlist">
[muie_keyword_search mla_phrase_delimiter=' ' mla_phrase_connector='OR']
</div>
</p>
<input id="attachment-category-form-submit" name="attachment_category_form_submit" type="submit" value="Search" />
</form>
[mla_gallery attachment_category=page-1 numberposts=10 add_filters_to=any mla_output="paginate_links,prev_next" post_mime_type=application/pdf option_all_value=all]
[mla_gallery attachment_category=page-1 numberposts=10 add_filters_to=any mla_nolink_text="No items match the current filter selections." link=file post_mime_type=application/pdf option_all_value=all]
The changes I have made are:
- The first shortcode in the “searchlist” div is changed from
[mla_term_list]
to [mla_gallery]
. This triggers the database query for the PDF documents that are assigned to a specified term.
- An
mla_alt_shortcode=mla_term_list
parameter has been added. This passes the items selected by the [mla_gallery]
database query to [mla_term_list]
, which composes the dropdown control.
- An
attachment_category=page-1
parameter has been added to select the items assigned to your “Att_Category the gallery is based on“. You must change page-1
(the term I used for my testing) to the slug value for the Att. Categories term you want to filter on.
- A
post_mime_type=application/pdf
parameter has been added to restrict the query to PDF documents only.
In the two [mla_gallery]
shortcodes for the gallery display and pagination controls I have made two additions:
- An
attachment_category=page-1
parameter has been added to select the items assigned to your “Att_Category the gallery is based on“. You must change page-1
(the term I used for my testing) to the slug value for the Att. Categories term you want to filter on.
- A
post_mime_type=application/pdf
parameter has been added to restrict the query to PDF documents only.
If you make the corresponding changes in your prova-2
test page you should get a good result.
It would be great if you can install the Development Version and the updated example plugin and let me know if they work for you. I will leave this topic unresolved until I hear back from you. Thanks again for giving me an interesting opportunity to enhance MLA.