• 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

Can't get WordPress Search to work

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 › Can't get WordPress Search to work

This topic is: not resolved

Tagged: search, Wordpress Search not working.

  • This topic has 3 replies, 2 voices, and was last updated 11 years, 5 months ago by Summer.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • May 20, 2014 at 8:13 am #106010
    tashworth19191
    Member

    I am developing http://BoiseBlog.com and converted it from a standard theme to a genesis theme (Lifestyle Pro). The search worked on the old theme, but not on the Lifestyle Pro Theme.

    Here is what I put in the sidebar widget for code;

    <form method="get" id="searchform" action="<?php bloginfo('url'); ?>/">
    <div><input type="text" value="<?php the_search_query(); ?>" name="s" id="s" />
    <input type="submit" id="searchsubmit" value=">" /></div>
    </form>

    Whis is the same code that is on searchform.php in the theme.

    That did not work, so I added this to my functions.php file:

    // Set number of posts for search results to 18
    add_action( 'pre_get_posts', 'child_search_posts_per_page' );
    function child_search_posts_per_page( $query ) {
        if ( !is_admin() && $query->is_main_query() && $query->is_search() ) {
            $query->set( 'posts_per_page', 18 );
        }
    }

    If you happen to go to website and look in the sidebar the search is "Search Past Post". That is what I am trying to get working again. Any help is appreciated.

    http://boiseblog.com
    May 20, 2014 at 11:28 am #106044
    Summer
    Member

    Does the default Search widget still work if you drag it to the sidebar?


    WordPress / Genesis Site Design & Troubleshooting: A Touch of Summer | @SummerWebDesign
    Slice of SciFi | Writers, After Dark

    May 20, 2014 at 11:54 am #106050
    tashworth19191
    Member

    I did drag the default search box to sidebar and it does not work.

    May 20, 2014 at 2:05 pm #106064
    Summer
    Member

    Did you still have the added code to functions.php when you used the Search widget? It sounds like that code or something else is messing up the default WP search.

    What other plugins do you have on the site? Have you tried disabling them and removing your custom search code?


    WordPress / Genesis Site Design & Troubleshooting: A Touch of Summer | @SummerWebDesign
    Slice of SciFi | Writers, After Dark

  • Author
    Posts
Viewing 4 posts - 1 through 4 (of 4 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

© 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