Winning Agent

Sales That Work

  • About
  • Store
  • Blog
  • The Stream
  • Forum
  • Jobs

Remove Search Bar on Select Pages in Winning Agent

December 7, 2015 by Marcy Diaz Leave a Comment

Share this post:

Share on TwitterShare on FacebookShare on PinterestShare on LinkedIn

By default the Winning Agent Pro theme shows the Search Bar widget on every page. However, there may be some pages that you don’t need or want it to show. This tutorial will show you two methods to remove search bar widget on select pages in Winning Agent, so you can choose the one that’s easiest for you. These will work for you whether you use IDX Broker or AgentPress Listings in your search bar.

Method 1 – Edit functions.php and Add a Body Class

Note: Before editing your functions.php, backup your WordPress, download a copy of functions.php, and be sure you have FTP or CPanel access to your website.

For this method, you will make a one-time edit to functions.php, and then, whenever you want to hide the search bar on a particualar page, you would add a body class to that page. So here’s how.

Step 1. Edit functions.php

In your functions.php, at line 157, find the following section, comment it out, as shown, and add the new code section just below it.

Upload your new functions.php to your Winning Agent theme folder using FTP.

Step 2. Add a Body Class to Select Pages

In WordPress, edit one of the pages that you want to hide the search bar.

  1. Look below the editor.
  2. You’ll find a section section labeled “Layout Settings”. (If you don’t see this section, you can click on the “Screen Options” tab in the upper right hand corner, and check it.)
  3. In the field labeled “Custom Body Class” add:
    no-search-bar
  4. Click the blue Update button to save the page.

genesis layout settings - add body class

You can add the “no-search-bar” body class to any pages you want to remove or hide the search bar.

Method 2 – Use a Widget Visibility Plugin

You can also use a widget visibility plugin to remove the search bar on select pages. This tutorial shows you how to use the Widget Visibility module in Jetpack. If you don’t use Jetpack, Display Widgets or Restrict Widgets will also work.

hide search bar using jetpack widget visibility

  1. If you use Jetpack, you can activate the Widget Visibility module.
  2. Then go to Appearance > Widgets > Search Bar widget area.
  3. Open the widget you’re using (Text widget or AgentPress – Listing Search), and click the gray Visibility button at the bottom next to the blue Save button.
  4. Then change “Show” to “Hide”.
  5. From the drop down, choose “Page” is > and select the pages you want to hide.
  6. Click the blue Save button on the widget.

We’re always here to help you with your Winning Agent theme, if you need it. Just complete a support request.

More Great Reading

Share this post:

Share on TwitterShare on FacebookShare on PinterestShare on LinkedIn

Filed Under: Blog, Realtor Tech Tips

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Looking For Something?

Email Newsletter

Sign up to receive free updates from the Winning Agent blog.

Connect With Me

  • Facebook
  • LinkedIn
  • Pinterest
  • Twitter

StudioPress Real Estate WordPress Theme: Agent Focused Pro Theme

StudioPress Premium WordPress Themes: Winning Agent Pro Theme




Loan Types & Property Definitions

There are a lot of different types of mortgages, and there are a lot of different types of real estate property. Here is a list of the most common types of each. We’ve added some links to the most popular articles on the subject.

Read More

Real Estate and Mortgage Forum

We think getting many viewpoints to a particular question is important because it helps you to make better decisions. It’s so important that we have woven the Forum all throughout Winning Agent. We invite you to ask questions, make comments, and be part of the discussion.

Read More

Glossary of Real Estate Terms

Real estate and mortgage finance often times comes with its own unique language. If you work with it every day, it becomes 2nd nature, but most people don’t work with it every day. So we’ve created a glossary of mortgage and real estate terms.

Read More

Copyright © 2023 Winning Agent · Powered by the Genesis Framework · Contact Us
Become an Affiliate
This site uses affiliate links, but know that we only recommend products we personally use and enjoy!

 

Loading Comments...