• Hi,

    I have a custom theme for wordpress. I’m not using header.php in homepage. However, this plugin’s css and js libraries place in “header.php”. I copied these css and js libraries as below and paste in my homepage php codes. Search bar is in the menu. Everything is okay for other pages (include header.php) but in my homepage(not include header.php) at the first time when I type any text, plugin show results perfectly, but when I close menu or when I navigate other tabs, plugin’s dropdown menu is not dissappearing.

    Can you help me?
    Thank you.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author wpdreams

    (@wpdreams)

    Hi,

    The plugin scripts are placed to the footer by default, only the stylesheets are loaded to the header by default to prevent FOUC issues. Not including the header probably causes issues with the script loading queue with other core wordpress libraries, but it is hard to tell. This could be caused by a 3rd party script as well, since it is working on the other pages, and it does work initially.
    If you want, you can share a URL where I can take a look, but I can not guarantee anything though.

    Best,
    Ernest M.

    Thread Starter bt55

    (@bt55)

    Hi again and thank you for your reply.

    Actually, I didn’t use footer.php in homepage codes too. The error may be caused here.

    You can check odsdanismanlik.com

    Thank you.

    Plugin Author wpdreams

    (@wpdreams)

    Thank you!

    One issue I can see right away. You have two separate jQuery instances loaded – one in the site header and one in the site footer. The one in the footer is the correct version, however it should be loaded in the header instead and the rest of the scripts in the footer. Moving the correct enqueue to the header and removing the footer jQuery will probably resolve all issues – in the future as well, and will save you some page loading time too.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Dropdown menu is not disappearing in Custom Theme (not include header.php)’ is closed to new replies.