User-driven Search in MLA_gallery shortcode
-
Hi, this is an incredibly powerful plugin, thanks for it! Im feeling a little swamped in the documentation; I am looking code that will show the full gallery for a specific category (i have this part working, with pagination). Now I want to add a search box that will allow the user to search for specific images with the term in the title. When I add that code, the initial load of the page shows nothing. That is where I am stuck. How to initially load page fully (because nothing was searched for), then allow user to subset images using search box?
As per the documentation, here is the code I am adding:
<form id=”mla-search-form” action=”.” method=”post”>
<input id=”mla-search-box” name=”search-string” type=”text” value=”” /> <input id=”submit” name=”submit” type=”submit” value=”Search” />
</form>[mla_gallery s=”{+template:({+request:search-string+}|a-bad-term)+}” posts_per_page=12 mla_output=”paginate_links,prev_next” mla_link_href=”{+page_url+}?search-string={+request:search-string+}”]
[mla_gallery s=”{+template:({+request:search-string+}|a-bad-term)+}” mla_nolink_text=”Enter a search value above to display gallery.” posts_per_page=12]
thanks!
The topic ‘User-driven Search in MLA_gallery shortcode’ is closed to new replies.