searchform Shortcode Echoing instead of Returning
-
The searchform shortcode added to Relevanssi is a nifty feature, but it is coded incorrectly and is making a mess of our home page display as a result. The call to the WP core function to display the search form needs to indicate that it should be returned, not echoed.
The function relevanssi_search_form() is coded as:
return get_search_form();
It needs to be:
return get_search_form( false );
This has broken a number of our sites (we weren’t using Relevanssi’s shortcode; we already had our own, correctly coded, searchform shortcode that is now calling Relevanssi’s function instead of our own). We will be renaming our own shortcode to eliminate the conflict, but as we have 300+ WordPress sites to update, we’d appreciate a quick fix to this.
The topic ‘searchform Shortcode Echoing instead of Returning’ is closed to new replies.