Advertisement:

Author Topic: Search home page  (Read 1540 times)

glm2006italy

  • Jr. Member
  • **
  • Posts: 62
  • glm2006ITALY - Italian Power :D
Search home page
« on: January 23, 2014, 03:49:14 pm »
Hi!

This my website:
http://www.montagneinvacanza.it/annunci/

I would like to create a search form on the home page more advanced allowing to choose the category and region/province

is it possible?

Thanks

frosticek

  • Hero Member
  • *****
  • Posts: 3948
Re: Search home page
« Reply #1 on: January 25, 2014, 03:02:11 pm »
@glm2006italy
Sure, you only need to copy code that provide search from inc.search.php file  ;)

glm2006italy

  • Jr. Member
  • **
  • Posts: 62
  • glm2006ITALY - Italian Power :D
Re: Search home page
« Reply #2 on: January 25, 2014, 03:05:54 pm »
Good!

Can you give me the code to paste?

frosticek

  • Hero Member
  • *****
  • Posts: 3948
Re: Search home page
« Reply #3 on: January 25, 2014, 08:08:10 pm »
@glm2006italy
It is located in oc-content/themes/your_theme/inc.search.php or you can download modern theme and copy it from here  ;)

glm2006italy

  • Jr. Member
  • **
  • Posts: 62
  • glm2006ITALY - Italian Power :D
Re: Search home page
« Reply #4 on: January 26, 2014, 12:26:33 am »
Should I change this code:

Code: [Select]
<form action="<?php echo osc_base_url(true) ; ?>" method="get" class="search" onsubmit="javascript:return doSearch();">
    <input type="hidden" name="page" value="search" />
    <fieldset class="main">
        <input type="text" name="sPattern"  id="query" value="<?php echo osc_esc_html( ( osc_search_pattern() != '' ) ? osc_search_pattern() : $sQuery ); ?>" />
        <?php  if ( osc_count_categories() ) { ?>
            <?php osc_categories_select('sCategory'null__('Select a category''italia')) ; ?>
        <?php  ?>
    <button type="submit"><?php _e('Search''italia') ; ?></button>
    </fieldset>
    <div id="search-example"></div>
</form>

frosticek

  • Hero Member
  • *****
  • Posts: 3948
Re: Search home page
« Reply #5 on: January 26, 2014, 12:14:33 pm »
@glm2006italy
Nope, it is right code  ;)

glm2006italy

  • Jr. Member
  • **
  • Posts: 62
  • glm2006ITALY - Italian Power :D
Re: Search home page
« Reply #6 on: January 26, 2014, 12:18:38 pm »
Unfortunately it does not work: in the home page of the search form will not change  :'(

frosticek

  • Hero Member
  • *****
  • Posts: 3948
Re: Search home page
« Reply #7 on: January 26, 2014, 04:13:15 pm »
@glm2006italy
It is strange, because for me it works. What exactly does not work?

glm2006italy

  • Jr. Member
  • **
  • Posts: 62
  • glm2006ITALY - Italian Power :D
Re: Search home page
« Reply #8 on: January 26, 2014, 04:41:09 pm »
this my home
http://www.montagneinvacanza.it/annunci/

if I edit the file that you have shown me simply ... does not change the form!