WordPress.org

Ready to get started?Download WordPress

Forums

Search field- how? (5 posts)

  1. krugi
    Member
    Posted 4 years ago #

    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.

  2. Jonas Grumby
    Member
    Posted 4 years ago #

    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.

  3. Maiskolben
    Member
    Posted 4 years ago #

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

  4. Jonas Grumby
    Member
    Posted 4 years ago #

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

  5. krugi
    Member
    Posted 4 years ago #

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

Topic Closed

This topic has been closed to new replies.

About this Topic