Skip to content
This repository has been archived by the owner on Sep 16, 2019. It is now read-only.

Toggle search box not working on desktop view #802

Closed
tylerfoulkes opened this issue Apr 26, 2016 · 5 comments
Closed

Toggle search box not working on desktop view #802

tylerfoulkes opened this issue Apr 26, 2016 · 5 comments

Comments

@tylerfoulkes
Copy link

I am working on a website that has a set of social icons in the header, one of the icons is a search icon. When you click it the search box toggles down and you can search something. Something happened (Im not quite sure what) but now the search box only toggles on mobile view and when it toggles, it toggles the navigation as well, why doesn't it toggle on desktop view? and why is it linked to the navigation toggle on mobile view?

Any help would be greatly appreciated!

@colin-marshall
Copy link
Collaborator

Please provide the php for these social icons in your header.

@tylerfoulkes
Copy link
Author

tylerfoulkes commented May 2, 2016

<div id="logo">
    <div class="row show-for-medium">
        <div class="medium-8 columns">
            <a href="<?php echo home_url(); ?>"><img src="<?php echo get_template_directory_uri(); >/assets/images/site/logo.png"></a>
        </div>
     <div class="medium-4 columns">
         <?php get_template_part( 'parts/header', 'icon-box' ); ?>
     </div>
    </div>
</div>

@tylerfoulkes
Copy link
Author

tylerfoulkes commented May 3, 2016

<div class="title-bar" data-responsive-toggle="site-navigation">
    <div class="title-bar-title">
        <button class="menu-icon" type="button" data-toggle="mobile-menu"></button>
        <center>
            <a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><img src="<?php echo get_template_directory_uri();?>/assets/images/site/logo.png" width="60%"></a>
        </center>
        <?php get_template_part( 'parts/header', 'icon-box' ); ?>
    </div>
</div>

The above code is also included in the header.php file but only runs for mobile view however when I press the search icon on mobile view it toggles both the navigation and the search box and when I remove this line of code from the above piece of code:

<?php get_template_part( 'parts/header', 'icon-box' ); ?>

The desktop view code runs as it should and the search box toggles but obviously the icons no longer show up on mobile view. I think Ive pin pointed it to be something wrong with the data-toggle tag being used for both navigation and search so on desktop view data toggle doesn't work at all because the data-toggle tag only works on mobile view. I just don't know what file I need to edit to solve it.

@colin-marshall
Copy link
Collaborator

@tylerfoulkes I tried to email you through the "Contact Me" link on your website but I got a message back that it didn't go through for some reason. Shoot me an email so I can resend the message to you. Thanks!

@colin-marshall
Copy link
Collaborator

Closing this... resolved via email with @tylerfoulkes

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants