Support » Plugin: WP Photo Album Plus » Link to search results

  • Resolved kevinagar

    (@kevinagar)


    Hi Jacob
    hope you’re keeping well and safe during these trying times. Is it possible to add a link to search results?
    I keep a list of Birds seen and birds photographed. I would like to click a birds name in the list and be taken to the results of searching for that bird’s name.
    So if I click on Robin I’m taken to the Search results page for the search term Robin. Hope that makes sense. At the moment if I click Robin in the list I’m taken to a single image that I’d previously selected/setup. Is there a short code I can add to the link?
    Thanks
    Kevin

    • This topic was modified 6 months ago by kevinagar.

    The page I need help with: [log in to see the link]

Viewing 14 replies - 1 through 14 (of 14 total)
  • serge-wp

    (@serge-wp)

    Interesting that you should ask precisely what I was looking for yesterday; some way to make a link on a page that would bring up the results of a search.
    I have found no way to place a link into a page (or a drop-down menu) that would give the same result as if I had typed that keyword into a [wppa] searchbox.
    I tried looking through my log files and/or checking what wordfence “saw”, but all I could see was that my “find” page was called up, but not the actual parameters as I had hoped.
    With a bit of luck, Jacob might help us both along the way 🙂
    Cheers,
    serge

    Plugin Author Jacob N. Breetvelt

    (@opajaap)

    – Set Table IX-E23: Search form method to get
    – Enter a search word in the search widget or input area of a wppa search shortcode box
    – press the magnifier or button to execute the search coomand.
    – Copy the addressline from the browser.

    If you do this on the docs and demo site ( wppa.nl ), you get this:
    https://wppa.nl/docs-by-subject/search/regular-search/?wppa-searchstring=kimmy&searchsubmit=&wppa-forceroot=66&wppa-searchroot=

    Once you get familiar with the querystring, you can construct your link.
    https://wppa.nl/docs-by-subject/search/regular-search/ is the landing page
    ?wppa-searchstring=kimmy: I entered Kimmy to search for
    &searchsubmit=: not required (is the value of the search button)
    &wppa-forceroot=66: not required, add this if you want to search in subalbums of album 66 only (originates from the shortcode attribute root="#66")
    &wppa-searchroot=: like forceroot, but used when rootsearch is enabled in the widget

    If you have &wppa-mocc=<any number>, include it, it is the sequence number of the landing shortcode on the landing page; default: 1.

    serge-wp

    (@serge-wp)

    AH! “GET” was the magic word!

    Many thanks for your detailed explanation, Jacob, that has fully sorted my question – and possibly Kevin’s as well.
    With my apologies for jumping on his bandwagon, I leave it to Kevin to take this further, should he need to.

    Thanks,
    serge

    Thread Starter kevinagar

    (@kevinagar)

    Thank you Jacob, exactly what I wanted and it works perfectly.
    No need to apologies Serge, we both wanted the same thing.
    Best regards
    Kevin

    Thread Starter kevinagar

    (@kevinagar)

    Sorry Jacob, just had a thought. Is it possible to exclude something from a search? Sometimes a common name for a bird is the same as the latin name, for example Anhinga has a Latin name of Anhinga anhiga for one species (Americas) and Anhinga Anhinga melanogaster (Indian Anhinga)
    I would like search results for only American Anhinga. I can’t use the search term American Anhinga and it finds the word Anhinga that includes Indian Anhinga. Using Indian Anhinga also finds Indian Myhna and searching American Anhinga also finds American Redstart. Hope that makes sense
    Best regards
    Kevin

    • This reply was modified 5 months, 4 weeks ago by kevinagar.
    • This reply was modified 5 months, 4 weeks ago by kevinagar.
    Plugin Author Jacob N. Breetvelt

    (@opajaap)

    You can change the ‘get’ into ‘post’ back, it will still work.

    Plugin Author Jacob N. Breetvelt

    (@opajaap)

    Table IX-E18.2: Exclude from search index. You can enter a comma separated list of words that should be ignored. If you change this setting, it will take a while before it works, because the search index will completely be rebuild at the background.

    Thread Starter kevinagar

    (@kevinagar)

    Thanks for the reply Jacob. This will exclude a word from all searches. Is there a way to exclude from a single search? So if I search for American Anhinga it doesn’t find Indian Anhinga, and if I search for Indian Anhinga it doesn’t find American Anhinga?

    Best regards
    Kevin

    Plugin Author Jacob N. Breetvelt

    (@opajaap)

    Try a semicolon (;) between the 2 words

    Plugin Author Jacob N. Breetvelt

    (@opajaap)

    Searching for American Anhinga means: find all photos that have American or Anhinga or both somewhere in the description etc.

    Searching for American;Anhinga means: find all photos that have American AND Anhinga somewhere in the description etc.

    In your querystring, replace ; by %3B

    Thread Starter kevinagar

    (@kevinagar)

    Thank you Jacob. Is there a list of search syntax somewhere? Just for reference as things are working great at the moment.

    Best regards
    Kevin

    Plugin Author Jacob N. Breetvelt

    (@opajaap)

    Thread Starter kevinagar

    (@kevinagar)

    Thank you Jacob, I’m sorry I should have done a bit more research before asking. Sorry to trouble you
    Best regards
    Kevin

    Plugin Author Jacob N. Breetvelt

    (@opajaap)

    You are welcome as always

Viewing 14 replies - 1 through 14 (of 14 total)
  • You must be logged in to reply to this topic.