• 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

Combine text and font awesome icon inside of search form input box

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 › General Discussion › Combine text and font awesome icon inside of search form input box

This topic is: not resolved
  • This topic has 3 replies, 2 voices, and was last updated 9 years, 9 months ago by Victor Font.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • February 16, 2016 at 11:27 am #179156
    faith
    Member

    Hello,
    I'm trying to combine text and a Font Awesome down arrow inside of a Search Form input box . I've found lots of solutions for either or, but not both. Can you help?
    Here's the code that's in functions.php and in my style.css. My down arrow is not displaying, and even if it did, how can I separate the font styles for the text and icon?

    //* Customize search form input box text
    add_filter( 'genesis_search_text', 'sp_search_text' );
    function sp_search_text( $text ) {
    return esc_attr( 'Type your city ...', '' );
    }

    .header-middle input {
    color:#efe9dd;
    border-radius:10px;
    border:1px solid #efe9dd;
    padding: 3px 12px 8px 12px;
    }
    .header-middle *::-moz-placeholder {
    font-family: "myriad-pro-condensed",sans-serif;
    font-size:20px;
    }
    .header-middle input:focus {
    padding: 3px 12px 8px 12px;
    font-family: "myriad-pro-condensed",sans-serif;
    font-size:20px;
    }
    .header-middle input[type="search"] {
    content: "\f107";
    font-family: FontAwesome;
    padding-right: 7px;
    display: inline-block;
    padding-left:30px;
    }

    February 16, 2016 at 4:17 pm #179187
    Victor Font
    Moderator

    This is what I use on my site:

    //* Customize search form input box text
    add_filter( 'genesis_search_text', 'sp_search_text' );
    function sp_search_text( $text ) {
    
    	return esc_attr( 'Search this site…' );
    
    }
    
    //* Customize search form input button text
    add_filter( 'genesis_search_button_text', 'sk_search_button_text' );
    function sk_search_button_text( $text ) {
    
    	return esc_attr( '' );
    
    }

    Regards,

    Victor
    https://victorfont.com/
    Call us toll free: 844-VIC-FONT (842-3668)
    Have you requested your free website audit yet?

    February 16, 2016 at 8:39 pm #179204
    faith
    Member

    Oh wow that worked! Thank you SOOO much Victor. I also found out how to style the button (font awesome icon). First I put a position: relative on the .search-form. Then, I did this.....

    input[type="submit"] {
    border: 0;
    color:#efe9dd;
    display:inline-block;
    font-family: 'FontAwesome';
    font-size:20px;
    padding:0;
    background-color:transparent;
    position: absolute;
    left: 170px;
    top:10px;
    }

    February 18, 2016 at 10:44 pm #179360
    Victor Font
    Moderator

    Glad you figured it out.


    Regards,

    Victor
    https://victorfont.com/
    Call us toll free: 844-VIC-FONT (842-3668)
    Have you requested your free website audit yet?

  • Author
    Posts
Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘General Discussion’ 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

© 2025 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