Winning Agent

Sales That Work

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

Limit Slider on Listings

Home › Forums › Winning Agent Pro Theme › Limit Slider on Listings

Tagged: slider

  • This topic has 4 replies, 2 voices, and was last updated 9 years, 5 months ago by richsadams.
Viewing 4 reply threads
  • Author
    Posts
    • June 12, 2014 at 6:35 pm #3144
      richsadams
      Participant

      Hi Carrie,

      I’m using the Genesis Responsive slider in the WAP template on this website:

      http://bennettprop.com

      Currently the slider automatically appears at the top of all pages, posts and listings.

      I would like to be able to limit the slider to either just the Home page and/or other specific pages as well as eliminate it completely from all individual listings.

      In the Genesis Responsive Slider settings there’s an area where it allows you to limit the slider on a per-listing basis (using the listing ID), but nothing regarding pages, posts or for all listings as a default.

      Any advice would be appreciated.

      Best wishes and TIA!


    • June 13, 2014 at 7:45 am #3150
      Carrie Dils
      Member

      What widget area are you using to add the slider to your site? If it’s the Search Bar widget area, that’s intended to show across all pages like you mentioned.

      Before I give you more info I want to make sure we’re talking about the same thing – sounds to me like the issue isn’t the slider, but the widget area you’re using to show it. Please confirm?


    • June 13, 2014 at 9:29 am #3151
      richsadams
      Participant

      Hi Carrie,

      Yes, it’s the search bar widget.

      Thanks again!


    • June 13, 2014 at 10:20 am #3153
      Carrie Dils
      Member

      Find this in functions.php:

      // Add search widget below header.
      add_action( 'genesis_after_header', 'wap_search_bar' );
      function wap_search_bar() {
      	genesis_widget_area( 'search-bar', array(
      		'before'=> '<div class="search-bar"><div class="wrap">',
      		'after'	=> '</div></div>',
      	) );
      }

      You can add in a conditional statement to specify where you want it to show. For example, adding this bit will only show it on the home page:

      	if ( ! is_front_page() ) {
      		return;
      	}

      COmbined, the code snippet looks like this:

      // Add search widget below header.
      add_action( 'genesis_after_header', 'wap_search_bar' );
      function wap_search_bar() {
      	if ( ! is_front_page() ) {
      		return;
      	}
      	
      	genesis_widget_area( 'search-bar', array(
      		'before'=> '<div class="search-bar"><div class="wrap">',
      		'after'	=> '</div></div>',
      	) );
      }

      BEFORE you edit your functions.php, please take a moment to read this tutorial otherwise you can accidentally break your site if you’re cutting and pasting improperly. http://www.carriedils.com/editing-wordpress-site-101/

      Also, here’s a tutorial on understanding WordPress conditionals: http://www.carriedils.com/wordpress-conditional-tags/


    • June 13, 2014 at 10:50 am #3155
      richsadams
      Participant

      Hi Carrie,

      That worked perfectly.

      Thank you again!


  • Author
    Posts
Viewing 4 reply threads
  • You must be logged in to reply to this topic.
Log In

Forum Login

Log In
Register Lost Password

Search Forums

StudioPress Real Estate WordPress Theme: Agent Focused Pro Theme
StudioPress Premium WordPress Themes: Winning Agent Pro Theme

Recent Replies

  • How To Find Winning Agent Pro Setup Instructions
  • How to edit main page background image opacity
  • Fresh Install Issues
  • Remove Background Image
  • Sidebar on Homepage
OptinMonster

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!