Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Search Bar Fly-Out Placement + Search Result Page
- This topic has 6 replies, 2 voices, and was last updated 3 years, 4 months ago by
DanHostettler45.
-
AuthorPosts
-
January 9, 2023 at 3:50 pm #40829
DanHostettler45
ParticipantHi Ernest,
Happy New Year!
As discussed via email a month ago, I have now purchased + installed the latest version of ASP. All’s running smoothly but I do have 2 open questions.
- Search Bar Fly-Out Placement
- Search Result Page
I have created a detailed PDF that lists my thoughts, references + questions. It also contains the login to my DEV server.
Thanks for having a look into this and for coming up with some hints + ideas.
Best regards from Spain,
DanJanuary 9, 2023 at 5:17 pm #40832Ernest Marcinko
KeymasterHi,
Thank you very much for your kind words!
Q1) Okay. There is the compact box feature, which is very useful if you have a tiny space to fit the search to. One great thing is, that you can use “vw” aka “window width” CSS values to set a dynamic width of the final search box size, for example: https://i.imgur.com/PShEfdg.png
50vw will limit the search box final width to 50% of the overall window viewport width.
I would definitely recommend experimenting with these dynamic properties.Q2) Yes – You can just set that feature to actually redirect to the results page: https://i.imgur.com/jvhhfjX.png
January 10, 2023 at 5:31 pm #40848DanHostettler45
ParticipantHi Ernest,
Thanks for your swift feedback! OK:Q1) I already used the option of compact box yet since ASP’s DIV is implemented within the MastHead DIV, there’s never enough space on smaller screens. Yet (!), I came up with a workaround, hiding more MastHead elements when under 1024. I updated the JS accordingly and now at least “space-wise” it works. It’s not the most elegant solution, but it does the trick for now. Thanks!
Q2) OK, got it. I missed that! Follow-up up Q here >
Although reading the KB (https://documentation.ajaxsearchpro.com/layout-settings/more-results-link) it’s unclear for me, how to implement the “Redirect to custom URL”.- I have created a page/template > https://wordpress-673625-3090857.cloudwaysapps.com/search-results
- Yet whatever I choose to put into the ” ‘ Show more results..’ url “, I am getting a 404.
- Pls see my attempts in the following screenshot: https://imgur.com/a/haDJbdC
Thank you,
DanJanuary 11, 2023 at 1:57 pm #40858Ernest Marcinko
KeymasterHi Dan,
Q2) Sorry about that, I forgot.
This is a bit more complicated. Simply creating a template file will not move the results page from one location to another. WordPress has an automatic results page handler, which is triggered whenever the main site URL is hit with the presence of the “s” parameter, like:
yoursite.com/?s=phraseOnly by creating a page/template on a different URL will not move the search results page there. Ajax Search Pro can only redirect to an existing results page handler, it will not move the actual results page to that URL.
The reason behind it is, that it’s rather complicated, it requires special mod_rewrite rules, which should not conflict with existing permalink structures and so on..I generally do not recommend moving the results page slug, in most cases it generates more issues. However you can check out this tutorial on how to make a custom results page permalink. Keep in mind, that this may not work out of the box, for every case it is very different. I only recommend starting with moving the results page URL if you have experience in apache mod_rewrite rules and have some spare time.
January 11, 2023 at 3:24 pm #40860DanHostettler45
ParticipantHi Ernest,
No worries! And, thanks for the clarification.
I see – so, my assumption was a tad simplistic 🙂 The whole idea of having a separate template was bcs of the page’s styling. But in this case, I will find another way to inject CSS dynamically into the search result page, using our Custom CSS + JS plugin. This will do the trick.
Thanks for all your support!
Best,
DanJanuary 11, 2023 at 3:24 pm #40861Ernest Marcinko
KeymasterYou are very welcome Dan 🙂
If you don’t mind, I will close this topic soon and mark it as resolved, feel free to open another one if you have other questions or issues.
January 11, 2023 at 3:26 pm #40862DanHostettler45
ParticipantErnest, yes, please, mark it as resolved. Thanks!
-
AuthorPosts
- The topic ‘Search Bar Fly-Out Placement + Search Result Page’ is closed to new replies.