• krugi

    (@krugi)


    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)
  • Jonas Grumby

    (@ss_minnow)

    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.

    Maiskolben

    (@maiskolben)

    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…

    Jonas Grumby

    (@ss_minnow)

    @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.

    Thread Starter krugi

    (@krugi)

    @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.