• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Parallax Pro-add toggle search to the Primary navigation bar

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › Design Tips and Tricks › Parallax Pro-add toggle search to the Primary navigation bar

This topic is: not resolved

Tagged: toggle search

  • This topic has 17 replies, 3 voices, and was last updated 10 years ago by Brad Dalton.
Viewing 18 posts - 1 through 18 (of 18 total)
  • Author
    Posts
  • October 19, 2015 at 5:38 pm #168527
    peterlaz
    Participant

    I want to add toggle search to the Primary navigation bar in Parallax Theme. I followed the instructions as outlined in http://genesisdeveloper.me/adding-toggle-search-form-using-parallax-pro-theme/

    I then added the custom menu to the Header Right Widget.

    The search icon is showing up , but it is not working as it should be.

    I wonder if there are additional steps needed to get the toggle search working.

    Appreciate help.

    Thanks

    http://www.plan2040.com/
    October 20, 2015 at 3:08 am #168554
    Brad Dalton
    Participant

    You have a js error. Did you add the jQuery and load it using PHP code?


    Tutorials for StudioPress Themes.

    October 20, 2015 at 5:17 am #168557
    peterlaz
    Participant

    I created a new file in Dreamweaver CS6 with the following codes

    $(".toggle-search a").click(function() {

    $(".search-wrap").slideToggle('slow', function(){
    $(".toggle-search").toggleClass('active');
    });

    });

    and saved the file as toggle-seach.js

    Is that a problem? I will appreciate some guidance on creating Javascript files correctly.

    Thanks

    October 20, 2015 at 5:24 am #168558
    Brad Dalton
    Participant

    You need to load the file as well using PHP code.


    Tutorials for StudioPress Themes.

    October 20, 2015 at 6:22 am #168560
    peterlaz
    Participant

    Appreciate some guidance on how do that.
    Thanks

    October 20, 2015 at 6:45 am #168562
    Brad Dalton
    Participant

    The code is in the tutorial

    //* Enqueue Scripts
    add_action( 'wp_enqueue_scripts', 'wpsites_load_scripts' );
    function wpsites_load_scripts() {
    
    	wp_enqueue_script( 'toggle-search', get_bloginfo( 'stylesheet_directory' ) . '/js/toggle-seach.js', array( 'jquery' ), '1.0.0' );
    	
    }
    

    Add the above code to yoiur functions file.


    Tutorials for StudioPress Themes.

    October 20, 2015 at 7:20 am #168566
    peterlaz
    Participant

    Thanks for the prompt reply and guidance.

    I carried out all the steps outlined in the tutorial and have added the codes as

    //* Enqueue scripts and styles
    add_action( 'wp_enqueue_scripts', 'parallax_enqueue_scripts_styles' );
    function parallax_enqueue_scripts_styles() {

    wp_enqueue_script( 'parallax-responsive-menu', get_bloginfo( 'stylesheet_directory' ) . '/js/responsive-menu.js', array( 'jquery' ), '1.0.0' );
    wp_enqueue_style( 'dashicons' );
    wp_enqueue_style( 'parallax-google-fonts', '//fonts.googleapis.com/css?family=Montserrat|Sorts+Mill+Goudy', array(), CHILD_THEME_VERSION );
    wp_enqueue_script( 'toggle-search', get_bloginfo( 'stylesheet_directory' ) . '/js/toggle-seach.js', array( 'jquery' ), '1.0.0' );
    }

    However, I am not getting the desired results.

    October 20, 2015 at 7:28 am #168568
    Brad Dalton
    Participant

    Check the path to the js file matches the location of the file. Should be in the js folder.

    http://www.plan2040.com/wp-content/themes/parallax-pro/js/toggle-search.js


    Tutorials for StudioPress Themes.

    October 20, 2015 at 8:16 am #168574
    peterlaz
    Participant

    Thanks for prompt reply. Much appreciated.

    Yes, there was an error in the spelling of the file name. I have corrected it and the toggle-search.js file is now correctly located in the theme's JS folder. However, the result is still not showing up.

    Thanks.

    October 20, 2015 at 4:25 pm #168619
    peterlaz
    Participant

    Followed every code as outlined in http://genesisdeveloper.me/adding-toggle-search-form-using-parallax-pro-theme/
    There was suggestion by a reader Brian in the tutorial to use the following code for Javascript. I tried that without any success.

    jQuery(document).ready(function($js) {
    $js(".toggle-search a").click(function() {
    $js(".search-wrap").slideToggle('slow', function(){
    $js(".toggle-search").toggleClass('active');
    });
    });
    });

    October 20, 2015 at 4:32 pm #168620
    mmjaeger
    Member

    Try to wrap you function like this:

    (function($) {
    $(".toggle-search a").click(function() {
    	
         $(".search-wrap").slideToggle('slow', function(){
    	$(".toggle-search").toggleClass('active');
       });
       
    });
    })(jQuery);
    October 20, 2015 at 4:56 pm #168621
    peterlaz
    Participant

    Thanks for the guidance.

    I tried the code as suggested. But the search form is still not showing up.
    http://www.plan2040.com/wp-content/themes/parallax-pro/js/toggle-search.js

    Thanks.

    October 20, 2015 at 5:11 pm #168622
    mmjaeger
    Member
    This reply has been marked as private.
    October 20, 2015 at 5:30 pm #168625
    peterlaz
    Participant

    I am not seeing any reply. How do I view reply marked as private?

    October 20, 2015 at 5:54 pm #168628
    mmjaeger
    Member

    well, the javascript error is gone – that’s good – what I couldn’t find on your page however is the search form – why don’t you try to add the search form to the header widget area and we will see what happens.

    October 20, 2015 at 6:25 pm #168630
    peterlaz
    Participant

    Adding a search form to the header widget area is not a problem. If I add one, sure it appears. But that is not the way toggle search function is suppose work. I followed the tutorial to the letter as outlined in
    http://genesisdeveloper.me/adding-toggle-search-form-using-parallax-pro-theme/

    I just can't understand why when I click on the dashicon the search form does not pop up?

    Thanks

    October 20, 2015 at 6:51 pm #168631
    peterlaz
    Participant

    Is there another way to do the whole thing?

    October 20, 2015 at 7:53 pm #168635
    Brad Dalton
    Participant

    I have written a tutorial about how to do this however its for members only. For those who don't mind paying for access, here it is http://wpsites.net/web-design/drop-down-nav-menu-search-form/

    Includes installation support and gauranteed to work.


    Tutorials for StudioPress Themes.

  • Author
    Posts
Viewing 18 posts - 1 through 18 (of 18 total)
  • The forum ‘Design Tips and Tricks’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2025 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble