Replace Geocraft search functionality with default wp search form

Discussion in 'GeoCraft WordPress Theme' started by gmanolas, Jul 22, 2013.

  1. gmanolas

    gmanolas New Member

    Joined:
    Jul 9, 2013
    Messages:
    1
    Likes Received:
    0
    Hello,

    I would like to replace geocraft theme search form functionality (home_searchform.php)
    with wordpress default search functionality searchform.php, but i want to keep geocraft theme styling.

    A quick solution was to change this code in header.php :

    <?php
    if (file_exists(TEMPLATE_PATH . '/home_searchform.php')):
    require_once TEMPLATE_PATH . '/home_searchform.php';
    endif;
    ?>

    Changed with :

    <?php
    if (file_exists(TEMPLATE_PATH . '/searchform.php')):
    require_once TEMPLATE_PATH . '/searchform.php';
    endif;
    ?>

    It worked fine as i wanted but i lost the styling (css) of Geocraft theme.

    I need this because i tested relevanssi plugin and works fine with searching custom fields but it only applies to default wordpress search form.

    Can you help me please?

    Regards




     
  2. Nitesh

    Nitesh Support Staff

    Joined:
    Oct 19, 2012
    Messages:
    5,165
    Likes Received:
    160
    Hello,

    Create a div with class "main_search" and paste your search code in it.
    Check image for reference.

    search_001.png

    After that
    Paste this code in Custom CSS
    Appearance > Theme Option > Styling Option > Custom CSS

    Code:
    .main_search input[type="text"] {
    width: 330px;
    background-color: #fff;
    font-size: 13px;
    height: 30px;
    -webkit-border-radius: 5px;
    -moz-border-radius: 5px;
    border-radius: 5px;
    border: 1px solid #d9d9d9;
    padding-left: 10px;
    padding-right: 25px;
    color: #7f7c7c;
    }
     

Share This Page