search in stargazer

5 Replies ·

  1. I have a child theme of stargazer. The search field does not show between 1024px and about 815 px width, when it shows at the bottom of the menu.

    I changed back to Stargazer and it still has the same problem

    Can you replicate this? and suggest a fix,

  2. markmcl

    I created a new folder in the child theme named “js” and put the new file in it, which didn’t work.
    It worked when I replaced the file in Stargazer, except the search field opens in the toggled ‘open’ layout on page load (on wider screens), so I reverted to the original for the moment.

    It toggles closed as soon as browser window is narrowed/moved a bit.

    To save this file being overwritten when Stargazer has updates, would dequeuing it and re enqueuing in the child theme from the child theme ‘js’ folder be the way to go?

  3. Justin Tadlock

    Give this version a try:

    You could certainly dequeue Stargazer’s JS file and enqueue your own via a child theme. The only potential issue with that is missing out on any JS changes in the next Stargazer update.

    I recommend just overwriting Stargazers JS file simply because this is something I’m working on in my local copy of Stargazer and will push it into the next update. So, it getting overwritten in the next update should be a non-issue.

  4. markmcl

    the search field opens in the toggled โ€˜openโ€™ layout at 1041 px instead of the desired 1024px.

    close ๐Ÿ™‚

  5. Justin Tadlock

    I’m not sure how consistent that’s going to be between browsers. It’s going to depend on how they calculate width.

    You can make adjustments to line 124 of that file:

    if ( 1024 <= width ) {

    I’ve got it set to 1024. So, you might try adjusting that up/down to get what you want. I’ll try to dig more into it to see why this is not being treated consistently cross-browser.