• Resolved NiallASD

    (@niallasd)


    Hi all,

    If I’m asking this in the wrong place please let me know.

    On this page I have a search box and I can’t get it to function. What am I missing?

    <div class="wrap rounded">
        <input type="text" class="search rounded" placeholder="Search ..." value="" />
        <button class="go" type="submit"><span></span></button>
    </div>

    On the end of the black menu I have a functioning search box.

       <li id="searchicon" class="last" style="border-right: none; position: relative; cursor: pointer; width: 10px;"><a href='#' style="border-right: none;">
       <img src="<?php bloginfo('stylesheet_directory'); ?>/images/searchicon2.svg" alt="Search Greencastle Parish Online" class="bottom">
       <img src="<?php bloginfo('stylesheet_directory'); ?>/images/searchicon.svg" alt="Search Greencastle Parish Online" class="top"></a>
       </li>
         <div class="messagepop">
    		<?php get_search_form(); ?>
         </div><!-- messagepop -->
    <form method="get" id="searchform" action="<?php echo esc_url( home_url( '/' ) ); ?>">
    		<label for="s" class="assistive-text"><?php _e( '', 'jetpack' ); ?></label>
    		<input type="text" class="search-field" name="s" id="s" placeholder="<?php esc_attr_e( 'Search ...', 'jetpack' ); ?>" />
    	</form>

    Any help is appreciated,

    Niall

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • The issue is in this portion of code

    <div class="wrap rounded">
        <input type="text" class="search rounded" placeholder="Search ..." value="" />
        <button class="go" type="submit"><span></span></button>
    </div>

    You are missing form element wrapper, and your input is missing name attribute. Try with the following code instead:

    <div class="wrap rounded">
    <form method="get" id="searchformnotfound" action="<?php echo esc_url( home_url( '/' ) ); ?>">
        <input name="s" type="text" class="search rounded" placeholder="Search ..." value="" />
        <button class="go" type="submit"><span></span></button>
    </form>
    </div>
    Thread Starter NiallASD

    (@niallasd)

    That works, thanks a million!

    I just changed the form action to
    action="http://www.greencastleparish.com/wordpress/"

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Search not functioning’ is closed to new replies.