get_search_form example

/* translators: %s: Template name. */
    sprintf( __( 'Please include a %s template in your theme.' )basename( __FILE__ ) )
);
?> <div id="sidebar" role="complementary"> <ul> <?php             /* Widgetized sidebar, if you have the plugin installed. */
            if ( ! function_exists( 'dynamic_sidebar' ) || ! dynamic_sidebar() ) :
                ?> <li> <?php get_search_form(); ?> </li> <!-- Author information is disabled per default. Uncomment and fill in your details if you want to use it. <li><h2><?php _e( 'Author' ); ?></h2> <p>A little something about you, the author. Nothing lengthy, just an overview.</p> </li> --> <?php                 if ( is_404() || is_category() || is_day() || is_month() ||
                is_year() || is_search() || is_paged() ) :
                    
get_header();
?> <header class="page-header alignwide"> <h1 class="page-title"><?php esc_html_e( 'Nothing here', 'twentytwentyone' ); ?></h1> </header><!-- .page-header --> <div class="error-404 not-found default-max-width"> <div class="page-content"> <p><?php esc_html_e( 'It looks like nothing was found at this location. Maybe try a search?', 'twentytwentyone' ); ?></p> <?php get_search_form(); ?> </div><!-- .page-content --> </div><!-- .error-404 --> <?php get_footer();
'href' => array(),
                        ),
                    )
                ) . '</p>',
                esc_url( admin_url( 'post-new.php' ) )
            );
            ?> <?php elseif ( is_search() ) : ?> <p><?php esc_html_e( 'Sorry, but nothing matched your search terms. Please try again with some different keywords.', 'twentytwentyone' ); ?></p> <?php get_search_form(); ?> <?php else : ?> <p><?php esc_html_e( 'It seems we can&rsquo;t find what you&rsquo;re looking for. Perhaps searching can help.', 'twentytwentyone' ); ?></p> <?php get_search_form(); ?> <?php endif; ?> </div><!-- .page-content --> </section><!-- .no-results -->
$title = ! empty( $instance['title'] ) ? $instance['title'] : '';

        /** This filter is documented in wp-includes/widgets/class-wp-widget-pages.php */
        $title = apply_filters( 'widget_title', $title$instance$this->id_base );

        echo $args['before_widget'];
        if ( $title ) {
            echo $args['before_title'] . $title . $args['after_title'];
        }

        // Use active theme search form if it exists.         get_search_form();

        echo $args['after_widget'];
    }

    /** * Outputs the settings form for the Search widget. * * @since 2.8.0 * * @param array $instance Current settings. */
    
Home | Imprint | This part of the site doesn't use cookies.