@tmacgregor,
Thanks for your question and for posting the complete source text of your page and shortcodes; very helpful. Your question deserves its own support forum topic, but I will answer it here for your convenience.
Your page has a search form and three [mla_gallery]
shortcodes.
- The first shortcode does not match any items because of its
s=
parameter, so it displays the “Enter a keyword… ” mla_nolink_text
value.
- The second shortcode displays all of the PDF documents in the Media Library because it has no other filtering parameters.
- The third shortcode displays page navigation controls. It has an
mla_terms_phrases
filter.
It looks like your intent is to display all of the PDF documents (or the first page of documents) when the page loads, and a filtered set when one or more keywords are entered that match terms assigned in the attachment_tag
taxonomy. Is that right?
If I understand your application correctly, a few changes should get you the results you need. First, you only need two shortcodes; one for the items and one for the page controls. Second, both of the shortcodes must have exactly the same data selection parameters, so the navigation controls match the gallery display. Finally, the action="."
won’t work on your site because you are not using “pretty permalinks”. The “.” argument captures just the link portion of the URL, https://flcourts18.org/
; it does not add the ?page_id=4762
query argument that specifies the page.
Here is an alternative that should work for you:
[su_box title="Search by Circuit, County, Division, Judge or Case Number" style="default" box_color="#333333" title_color="#FFFFFF" radius="9" class="background-image: url('https://flcourts18.org/wp-content/themes/catch-responsive-pro/images/body-bg.jpg')"]
<form id="mla-search-form" action="https://flcourts18.org/?page_id=4762" method="post">
<input id="mla-search-box" name="search-string" type="text" value="" /> <input id="submit" name="submit" type="submit" value="Search" />
<p>
Enter a keyword to search administrative orders.
</p>
</form>[/su_box]
[mla_gallery]
mla_terms_phrases="{+template:({+request:search-string+}|a-bad-term)+}"
mla_terms_taxonomies=attachment_tag
post_mime_type=application/pdf
post_parent=all
posts_per_page=12
columns=1
size=none
mla_itemwidth=100
link=file
listtag=ol
mla_caption="{+description+}"
[/mla_gallery]
[mla_gallery]
mla_terms_phrases="{+template:({+request:search-string+}|a-bad-term)+}"
mla_terms_taxonomies=attachment_tag
post_mime_type=application/pdf
post_parent=all
posts_per_page=12
mla_output="paginate_links,prev_next"
mla_link_href="https://flcourts18.org/?page_id=4762&search-string={+request:search-string+}"
[/mla_gallery]
I have used the alternative “enclosing shortcode” syntax to break the shortcode up over several lines and make it easier to read and modify. My implementation displays an empty gallery when the page loads. If you want to display all documents, change the mla_terms_phrases
parameter (in BOTH shortcodes) to:
mla_terms_phrases="{+template:({+request:search-string+})+}"
Give this alternative a try and open a new support topic if you have any problems or further questions regarding the changes I’ve made. Thanks for your interest in the plugin.