• Resolved bward

    (@bward)


    How do you change the size of the autocomplete menu? Here’s a screenshot of the default appearance, https://ibb.co/84YK647.

    I looked through the css file (algolia-autocomplete.css) to try and find a class to modify, but there is a note that says,

    /* we set the width in JS */

    So it doesn’t appear that I am able to modify the size of the menu window. I would love to know how to do that. It’s just not big enough out of the box, especially for mobile. However, the search itself is top-notch!

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    If I recall right, and based on experiences, it should be automatically setting the width to match the input itself, which I assume would be done with that javascript mention in the css file.

    Beyond that, it’d just be a case of setting your own width via CSS.

    Also, if you set SCRIPT_DEBUG to true in your wp-config.php file, you’ll enable “debug” mode for Autocomplete which would do things like keep the dropdown open so you could work with styling it, etc.

    Thread Starter bward

    (@bward)

    You’re a gentleman and a scholar sir, that did work. So I can play with that.

    Ideally, I would like to make the menu expand more full screen like the Jetpack search (example: https://ibb.co/vdF3w4h). Is that possible, or would we need a developer, and if so, can you recommend one?

    Lastly, how can I dequeue all the .js and .css so it only loads on one page?

    Appreciate your assistance, Michael!

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    Are you talking just the width? or are you also referring to the content in the dropdown?

    Same way you dequeue any other css and js, wp_dequeue_script and wp_dequeue_style`

    Likely similar to https://github.com/WebDevStudios/wp-search-with-algolia/wiki/Customize-your-search-page#look–feel

    The entire Wiki section is pretty decent for information, though I doubt it contains EVERYTHING.

    Thread Starter bward

    (@bward)

    I did figure out the width.

    However, I am wondering if it’s possible, when someone clicks a search button, can they be given a near full-screen popup that they type their search into and which also shows their search result. Certainly for mobile.

    In my last post, I added a screenshot example.

    Thanks for the links, I did look through that one before coming here. I just couldn’t figure out how I would do what I’m asking with that documentation.

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    I have to assume it’s possible, it’s just a matter of figuring out the CSS for it all. I haven’t attempted that large of a search suggestions section thus far, so I don’t have any starter CSS code for it.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘With autocomplete, how to change the menu size?’ is closed to new replies.