[Resolved] modify Top Bar with child theme

This topic contains 3 replies, has 2 voices, and was last updated by  Andrew Misplon 1 month, 1 week ago.

  • Author
    Posts
  • #10709

    Ostsee
    Participant

    Hi,

    I purchased the Ultra Premium.
    I wanna use the original search icon/box in the Topbar. NOT in main-navigation.
    I removed all .menu-search from /themes/ultra-child/header.php
    I pasted the search code now in /themes/ultra-child/parts/top-bar.php

    I modified the css code, but it dont work. The searchbox disappear on click or mouseover
    Have anyone tried this?

    #10710

    Andrew Misplon
    Keymaster

    Hi Ostsee

    Thanks for posting 🙂

    Unfortunately, this isn’t a simple change. The header search uses JavaScript. The search is identified, in part, by the parent selector main-navigation. If you remove the search from that div, the JavaScript can’t locate the search form. The CSS targetting the search icon is also prefixed with the main-navigation class, moving the search out of that div means you’d have to add the styling to your child theme and remove the main-navigation` selector.

    Have you perhaps considered using: https://wordpress.org/plugins/bop-search-box-item-type-for-nav-menus/

    #10711

    Ostsee
    Participant

    Hi Andrew,
    thanks for your posting.

    bob-search-box is a good idea. it works with customisation.

    #10712

    Andrew Misplon
    Keymaster

    Super, glad to hear you’ve been able to make that work 🙂 Thanks for giving it a try.

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.

Scroll to top