Support » Fixing WordPress » Search field- how?

  • I’m creating new theme (my first one) and I don’t know how to create a search field.
    I’m using this tutorial to learn how to create a theme, so far it’s fine:
    click
    At this page he explains how to create a search field.
    I did exactly what he wrote, but there’s an error when I’m looking at it on the web.
    This is the text that shows up instead the search field:

    Warning: Division by zero in /home006/sub009/sc71291-WUPD/my-domain.com/wordpress/wp-content/themes/my-domain/index.php on line 53

    Warning: include() [function.include]: Unable to access /home006/sub009/sc71291-WUPD/my-domain.com/wordpress/wp-content/themes/my-domainphp’ in /home006/sub009/sc71291-WUPD/my-domain.com/wordpress/wp-content/themes/my-domain/index.php on line 53

    Warning: include(/home006/sub009/sc71291-WUPD/my-domain.com/wordpress/wp-content/themes/my-domainphp’) [function.include]: failed to open stream: No such file or directory in /home006/sub009/sc71291-WUPD/my-domain.com/wordpress/wp-content/themes/my-domain/index.php on line 53

    Warning: include() [function.include]: Unable to access /home006/sub009/sc71291-WUPD/my-domain.com/wordpress/wp-content/themes/my-domainphp’ in /home006/sub009/sc71291-WUPD/my-domains.com/wordpress/wp-content/themes/my-domain/index.php on line 53

    Warning: include(/home006/sub009/sc71291-WUPD/my-domains.com/wordpress/wp-content/themes/my-domainphp’) [function.include]: failed to open stream: No such file or directory in /home006/sub009/sc71291-WUPD/my-domains.com/wordpress/wp-content/themes/my-domain/index.php on line 53

    Warning: include() [function.include]: Failed opening ‘/home006/sub009/sc71291-WUPD/my-domains.com/wordpress/wp-content/themes/my-domainphp’’ for inclusion (include_path=’.:/usr/share/php5/’) in /home006/sub009/sc71291-WUPD/my-domains.com/wordpress/wp-content/themes/my-domain/index.php on line 53

    What should I do?
    Thank you in advance, Yuval.

Viewing 4 replies - 1 through 4 (of 4 total)
  • That example assumes that you have a theme file called searchform.php in your theme folder. If you don’t, try

    <?php get_search_form(); ?>

    I’m also not sure why he shows the searchform between <li></li> tags but it can simply be in a div instead.

    post the code snippet from line 53 of your index.php and try to set the chmod for your themefolder (include all files within) to 755. You have to make this by using a ftp client…

    @maiskolben – That’s not why it isn’t working. I’ll bet line 53 is where he asks it to include a file that doesn’t exist.

    @SS_Minnow- Thank you bery much!
    It’s working now. One more thing- should I save the “searchform.php” file?
    Or I can remove it?

    Thank you.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Search field- how?’ is closed to new replies.