• 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

Removing the "search" in Glam Pro theme

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 › Removing the "search" in Glam Pro theme

This topic is: not resolved

Tagged: Glam pro, Search Form

  • This topic has 1 reply, 2 voices, and was last updated 6 years, 4 months ago by Brad Dalton.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • October 31, 2016 at 12:29 pm #195559
    candacegodwin
    Participant

    Hello,

    The Glam Pro theme has a "search" embedded in the top navigation. I would like to remove this from this area. Could you please direct me to the appropriate code to remove?

    Thanks -- Candace

    http://bodybybethstudio.com
    November 1, 2016 at 4:21 pm #195613
    Brad Dalton
    Participant

    Remove or comment out the following code starting on line 86 of functions.php

    //* Add search form to navigation
    add_filter( 'wp_nav_menu_items', 'glam_primary_nav_extras', 10, 2 );
    function glam_primary_nav_extras( $menu, $args ) {
    	//* Change 'primary' to 'secondary' to add extras to the secondary navigation menu
    	if ( 'primary' !== $args->theme_location ) {
    		return $menu;
    	}
    
    	ob_start();
    	get_search_form();
    	$search = ob_get_clean();
    	$menu .= '<li class="right search">' . $search . '';
    
    	return $menu;
    }
    

    Tutorials for StudioPress Themes.

  • Author
    Posts
Viewing 2 posts - 1 through 2 (of 2 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

© 2023 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