Advertisement:

Author Topic: Remove search from Free responsive Osclass theme  (Read 2708 times)

Wedding Holland

  • Newbie
  • *
  • Posts: 19
Remove search from Free responsive Osclass theme
« on: January 08, 2016, 09:01:47 pm »
I like to remove the complete search bar.
This because i put Google custom  search instead.

I tried some solutions from this forum.
But al the time i get internal server errors.

Anybody an idea?

Thanks in advance,
Jaap

teseo

  • Hero Member
  • *****
  • Posts: 6169
Re: Remove search from Free responsive Osclass theme
« Reply #1 on: January 08, 2016, 09:52:16 pm »
Hi,

Are you talking about Minimalist theme? ???

Regards

Wedding Holland

  • Newbie
  • *
  • Posts: 19
Re: Remove search from Free responsive Osclass theme
« Reply #2 on: January 08, 2016, 10:33:34 pm »
Hi Teseo,

I use Free responsive Osclass theme by OsclassWizards

teseo

  • Hero Member
  • *****
  • Posts: 6169
Re: Remove search from Free responsive Osclass theme
« Reply #3 on: January 08, 2016, 10:56:37 pm »
osclasswizards/header.php, remove or comment this whole block:

Code: [Select]
  <div class="banner_none" id="form_vh_map">
    <form action="<?php echo osc_base_url(true); ?>" id="main_search" method="get" class="search nocsrf" >
      <div class="container">
        <input type="hidden" name="page" value="search"/>
        <div class="main-search">
          <div class="form-filters">
            <div class="row">
              <?php $showCountry  = (osc_get_preference('show_search_country''osclasswizards_theme') == '1') ? true false?>
              <div class="col-md-<?php echo ($showCountry)? '3' '4'?>">
                <div class="cell">
                  <input type="text" name="sPattern" id="query" class="input-text" value="" placeholder="<?php echo osc_esc_html(__(osc_get_preference('keyword_placeholder''osclasswizards_theme'), OSCLASSWIZARDS_THEME_FOLDER)); ?>" />
                </div>
              </div>
              <div class="col-md-2">
                <?php  if ( osc_count_categories() ) { ?>
                <div class="cell selector">
                  <?php osc_categories_select('sCategory'null__('Select a category'OSCLASSWIZARDS_THEME_FOLDER)) ; ?>
                </div>
                <?php  ?>
              </div>
              <?php if($showCountry) { ?>
              <div class="col-md-2">
                <div class="cell selector">
                  <?php osclasswizards_countries_select('sCountry''sCountry'__('Select a country'OSCLASSWIZARDS_THEME_FOLDER));?>
                </div>
              </div>
              <?php ?>
              <div class="col-md-2">
                <div class="cell selector">
                  <?php osclasswizards_regions_select('sRegion''sRegion'__('Select a region'OSCLASSWIZARDS_THEME_FOLDER)) ; ?>
                </div>
              </div>
              <div class="col-md-2">
                <div class="cell selector">
                  <?php osclasswizards_cities_select('sCity''sCity'__('Select a city'OSCLASSWIZARDS_THEME_FOLDER)) ; ?>
                </div>
              </div>
              <div class="col-md-<?php echo ($showCountry)? '1' '2'?>">
                <div class="cell reset-padding">
                  <button  class="btn btn-success btn_search"><i class="fa fa-search"></i> <span <?php echo ($showCountry)? '' 'class="showLabel"'?>><?php _e("Search"OSCLASSWIZARDS_THEME_FOLDER);?></span> </button>
                </div>
              </div>
            </div>
          </div>
          <div id="message-seach"></div>
        </div>
      </div>
    </form>
  </div>

Regards

Wedding Holland

  • Newbie
  • *
  • Posts: 19
Re: Remove search from Free responsive Osclass theme
« Reply #4 on: January 09, 2016, 12:35:36 am »
Hi Teseo,

Thanks for your effort, but removing this piece of code gives me a 500.

Cheers,
Jaap
« Last Edit: January 09, 2016, 12:48:20 am by Wedding Holland »

teseo

  • Hero Member
  • *****
  • Posts: 6169
Re: Remove search from Free responsive Osclass theme
« Reply #5 on: January 09, 2016, 12:49:13 am »
It shouldn't if you are careful. ??? Just below where that block ends (</div>) there's a <?php, if you deleted it inadvertedly that might provoke that 500 error... ???

Another quick and dirty solution would be to just hide that block:

Replace:

Code: [Select]
<div class="banner_none" id="form_vh_map">
with:

Code: [Select]
<div class="banner_none" style="display: none;" id="form_vh_map">
Although the first solution is far better in terms of performance.

Regards

Wedding Holland

  • Newbie
  • *
  • Posts: 19
Re: Remove search from Free responsive Osclass theme
« Reply #6 on: January 09, 2016, 01:09:34 am »
Hi Teseo,

I removed again the mentioned code.
Code: [Select]
'<img src="'.osc_current_web_theme_url('images/banner.jpg').'" />';

}
echo '</div>';
}
?>***ALL CODE HERE REMOVED***
                 <div class="cell selector">
 

Still get a 500.
For now I'll try your other option.

Wedding Holland

  • Newbie
  • *
  • Posts: 19
Re: Remove search from Free responsive Osclass theme
« Reply #7 on: January 09, 2016, 01:17:54 am »
Hi Teseo,

The code change may be is not the best, but for now it works like charm!

Thanks,
Jaap

teseo

  • Hero Member
  • *****
  • Posts: 6169
Re: Remove search from Free responsive Osclass theme
« Reply #8 on: January 09, 2016, 01:31:47 am »
Quote
I removed again the mentioned code.
Code: [Select]
'<img src="'.osc_current_web_theme_url('images/banner.jpg').'" />';

}
echo '</div>';
}
?>***ALL CODE HERE REMOVED***
                 <div class="cell selector">
 

No, you got it too short, the block you need to delete goes until:

Code: [Select]
          <div id="message-seach"></div>
        </div>
      </div>
    </form>
  </div>

Included, 49 lines in total in latest Osclasswizards 2.0.2

Anyway, you're welcome. :)

Regards

Wedding Holland

  • Newbie
  • *
  • Posts: 19
Re: Remove search from Free responsive Osclass theme
« Reply #9 on: January 09, 2016, 01:52:27 am »
 :P Next time I'll scroll a little  ::)

fumi

  • Newbie
  • *
  • Posts: 29
Re: Remove search from Free responsive Osclass theme
« Reply #10 on: March 28, 2017, 01:59:54 am »
Hello,
I know this is an old topic, but I figured it might be worth trying.

Thank you Wedding Holland for posting this and thank you teseo for posting the answer!
I have a related question that I thought you may have an answer.

I want to modify the components of this search (i.e. remove search by keywords, add search by date, etc.), which I wrote in details as a new topic below:
http://forums.osclass.org/3-7-x/osclasswizards-modifying-the-search-box/

Since I don't have an answer for the above question yet, I removed the entire search box following teseo's post.
It works perfectly! Thank you!

My next priority is to remove search by keyword on the next page(the page you get to after you click a category).

If you can help me out, it will be much appreciated! THANK YOU!

sohan

  • Newbie
  • *
  • Posts: 3
CAN SOME ONE TELL ME HOW TO MOVE SEARCH BAR ON EVERY PAGE IN OSCLASSWIZARDS
« Reply #11 on: March 11, 2018, 06:18:17 am »
HI, 
    CAN SOME ONE HELP ME OR  TELL ME HOW TO MOVE SEARCH BAR ON EVERY PAGE IN OSCLASSWIZARDS LIKE BENDER THEME