• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Search Form Shortcode

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › Design Tips and Tricks › Search Form Shortcode

This topic is: not resolved

Tagged: search

  • This topic has 5 replies, 2 voices, and was last updated 4 years, 1 month ago by andytc.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • August 16, 2019 at 12:13 pm #493007
    rogerp
    Participant

    I have implemented a search bar in my homepage using this code

    Add WordPress Search Box Code in 5 Minutes Flat

    It works fine but Ideally I want to remove the search button and have something more like here

    https://www.udemy.com/

    Where I can put - "What do you want to learn" in the search bar

    Anyone any ideas?


    Roger
    https://www.rogerperkin.co.uk/
    Check out my Network Automation Training – Training the Network Engineers of the Future

    https://www.rogerperkin.co.uk/
    August 18, 2019 at 8:52 am #493025
    andytc
    Participant

    You can use this code for the text -

    https://my.studiopress.com/documentation/snippets/search-form/customize-the-search-form-input-button/

    August 18, 2019 at 10:52 am #493028
    rogerp
    Participant

    Thanks Andy,

    What I ideally want to do is to remove the search button, make the search box only half width and change the text inside the search box


    Roger
    https://www.rogerperkin.co.uk/
    Check out my Network Automation Training – Training the Network Engineers of the Future

    August 18, 2019 at 10:59 am #493029
    rogerp
    Participant

    I have found this

    Search Form

    Managed to change the text in the search form box

    Just need to remove the button and make the box half width, but it's in a widget which is full width?


    Roger
    https://www.rogerperkin.co.uk/
    Check out my Network Automation Training – Training the Network Engineers of the Future

    August 19, 2019 at 5:35 am #493037
    andytc
    Participant

    Try this , adjust percentage widths as you need , don't forget your mobile views , I've added a media query to makes this look better , see how it goes and adjust as you need.

    .search-form:before {
      content:none;
    }
    
    .search-form input[type=search] {
      padding-left: 0;
      margin-right: 20px;
      width: 80%;
      text-align: center;
    }
    
    .search-form input[type=submit] {
      display:inline-block;
    }
    
    @media only screen and (max-width: 880px) {
     .search-form input[type=search] {
       margin-right: 0;
       width: 100%;
       text-align: center;
     }
    
     .search-form {
       margin-top: 20px;
     }
    
    .search-form input[type=submit] {
      display:block;
      margin: 20px auto 0;
     }
    
    }
    August 19, 2019 at 5:47 am #493038
    andytc
    Participant

    That might not be what you wanted ? , you want to remove the search text and only have the icon ?

    In that case try here -

    https://wpsites.net/web-design/3-ways-to-customize-genesis-search-form-input-box-button/

  • Author
    Posts
Viewing 6 posts - 1 through 6 (of 6 total)
  • The forum ‘Design Tips and Tricks’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2023 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble