Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter hahalj

    (@hahalj)

    Alright, I found the solution. By adding this to my shortcode it all works as I want to:
    mla_search_connector="OR"

    Thanks for an excellent and extremely versatile plugin!

    Thread Starter hahalj

    (@hahalj)

    Something’s not right on my side, the documentation says:

    “The user can enter one or more words to search for in the Title or Description of Media Library items, then click “Search” to display a gallery of matching images:”

    When I use an exact copy-and-paste from the documentation sample code:

    <form id="mla-search-form" action="." method="post">
    <input id="mla-search-box" name="search-string" type="text" value="" />&nbsp;<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]

    I still can only use a single word search. Two words always give me empty result, even though the words are present in both photo titles and/or file names.

    What could possibly be wrong?

    Thread Starter hahalj

    (@hahalj)

    I found the answer to my second question, if I add
    mla_search_fields="title,file"
    to my shortcode it only match towards these fields.

    Still for my first question I haven’t figured out how to do it. In the search input I’d like to write for example “sunset,winter” and then get all photos matching either both or any of those. Can’t figure out how to do it, or if it’s even possible.

    • This reply was modified 3 years, 11 months ago by hahalj.
    • This reply was modified 3 years, 11 months ago by hahalj.
Viewing 3 replies - 1 through 3 (of 3 total)