WordPress.org

Ready to get started?Download WordPress

Forums

Include search form with is_pages() (2 posts)

  1. vrada
    Member
    Posted 9 years ago #

    This is a really stupid questions that I should know, but I am tired :)

    If I have a string of if (is_home()) {} etc., how do I include the searchform within it

    [<?php include (TEMPLATEPATH . '/searchform.php'); ?> ].

    Meaning I can't include a open php tag within another.

    Thanks for help

  2. vrada
    Member
    Posted 9 years ago #

    Nevermind just figured it out:

    <form id="searchform" method="get" action="<?php echo $_SERVER['PHP_SELF']; ?>">

Topic Closed

This topic has been closed to new replies.

About this Topic