• The default search widget now shows the default search form, instead of what’s in my searchform.php file.

    What do I need to do to debug this?

Viewing 8 replies - 1 through 8 (of 8 total)
  • This would depend, I must assume, on what is in that file. Assuming it’s a theme file, please consult theme provider.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    Is the file still there? And are you still calling it correctly?

    https://codex.www.ads-software.com/Function_Reference/get_search_form

    Also were you using a child theme?

    Thread Starter farzher

    (@farzher)

    @seacoast Web Design
    Why would it at all depend what’s in the file. The problem is that it’s not using it. It’s my theme.

    @ipstenu (Mika Epstein)
    “Is the file still there? And are you still calling it correctly?”
    Yeah, it’s there. If I visit it directly it says Call to undefined function home_url(), which makes sense. Wut, I’m not calling it, I’m using the default search widget, didn’t you read the question even.

    But I tried <?php get_search_form( true ); ?> also and it doesn’t use searchform.php either.

    Why would it at all depend what’s in the file

    WordPress is a custom application of PHP….please look here:

    https://us.php.net/

    Thread Starter farzher

    (@farzher)

    Are you serious? You’re telling me WordPress is built in PHP? Thanks for the help man.

    It’s not using the searchform.php file, it’s just using the default form. I don’t think it matters at all what’s in searchform.php

    Has anyone resolved this yet? I’m using a child theme with the Genesis framework and WordPress 3.6 Update is reverting my search form back to the default, completely ignoring searchform.php in my child theme directory. I’ve looked through functions.php for the search form code, but cannot find it anywhere. I see what I could be the default search form code in /wp-includes/general-template.php, but the placeholder text that appears there is not what’s appearing on my home page.

    @king Thor: As per the Forum Welcome, you really need to post your own topics rather than posting in someone else’s topic.

    As it stands, you are using a commercial theme, so you need to seek support from the theme’s developer/vendor. We do not support commercial products here.
    Try https://www.studiopress.com/support

    Adding this code to your functions.php should do the trick.

    function search_form_no_filters() {
      // look for local searchform template
      $search_form_template = locate_template( 'searchform.php' );
      if ( '' !== $search_form_template ) {
        // searchform.php exists, remove all filters
        remove_all_filters('get_search_form');
      }
    }
    add_action('pre_get_search_form', 'search_form_no_filters');

    I did a write up of this at https://salferrarello.com/searchform-php-wordpress-3-6-broken/

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘3.6 upgrade – searchform.php not working’ is closed to new replies.