Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Force 'block' results layout on mobile
- This topic has 10 replies, 2 voices, and was last updated 4 years, 8 months ago by
itsjonesyy70.
-
AuthorPosts
-
September 7, 2021 at 4:14 pm #34583
itsjonesyy70
ParticipantI can see option in the mobile behaviour section that allow me to force the ‘hover’ results layout on mobile.
For certain reasons I need to force the ‘block’ layout on mobile. How can I do this?
Thanks
September 8, 2021 at 12:44 pm #34605Ernest Marcinko
KeymasterHi,
I’m afraid you can’t with a single search bar. However, you can create another search instance, and set the original to display only on desktop devices, and the new one to only on mobile devices: https://i.imgur.com/xh2DfEe.png
September 8, 2021 at 1:01 pm #34609itsjonesyy70
ParticipantGood idea, thats sorted it 🙂 Thanks
September 8, 2021 at 1:04 pm #34610Ernest Marcinko
KeymasterYou cannot access this content.
September 9, 2021 at 12:20 pm #34641itsjonesyy70
ParticipantHi Ernest quick question – how will this impact the Ipad pro viewport? I’m testing the layouts and it seems to be an issue, as it isn’t seen as a desktop or mobile, so there is no search bar at all.
What determines your mobile / desktop display in the backend of the plugin? Is it viewport size or something else?
Will I need to find another solution in css like display: none for certain viewports?
September 9, 2021 at 12:43 pm #34642Ernest Marcinko
KeymasterIt is not a viewport solution, checks the user agent on server side. It only checks if the current device is mobile or not. The iPad should fall into the desktop category by the script. Either one or the other must be displayed. In case you are using a page builder or something similar of some sort, make sure the container module is not hidden on tablet devices.
If nothing works, can you please add temporary FTP and back-end access? I would like to check what is on the output there.
September 10, 2021 at 11:53 am #34665itsjonesyy70
ParticipantHi Ernest, I’ve checked for any theme setting that could cause the bar to be hidden, but I can’t find anything. The settings look OK in your plugin too.
I’ve added an access link for you to check things. It’s a staging server so if it breaks I can provision a new one.
Please look at the standard ipad horizontal orientation preview, and the ipad pro preview. Desktop ajax bar is not appearing.Thanks!
September 10, 2021 at 11:53 am #34666itsjonesyy70
ParticipantYou cannot access this content.
September 10, 2021 at 12:11 pm #34668Ernest Marcinko
KeymasterThank you!
I found the issue – the UA detection script recognizes tablet devices are mobile not as desktop, my mistake, I am sorry. Basically everything handheld is considered a mobile device (except for laptops). I can see the search ID=3 on the page printed, so it confirms that, it is only not visible because it is in the mobile menu.
September 10, 2021 at 12:18 pm #34669itsjonesyy70
ParticipantOK Thank you! So it looks like I will need to figure a work around for having the block results on mobile only, if they will appear on larger tablets too (which need the floating results option). Do you have any suggestions?
September 11, 2021 at 10:35 am #34672itsjonesyy70
ParticipantHi, I have sorted a work around. Please close the ticket
-
AuthorPosts
- The topic ‘Force 'block' results layout on mobile’ is closed to new replies.