• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

PHP get_search_form函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中get_search_form函数的典型用法代码示例。如果您正苦于以下问题:PHP get_search_form函数的具体用法?PHP get_search_form怎么用?PHP get_search_form使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了get_search_form函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: genesis_404

/**
 * This function outputs a 404 "Not Found" error message
 *
 * @since 1.6
 */
function genesis_404()
{
    echo genesis_html5() ? '<article class="entry">' : '<div class="post hentry">';
    printf('<h1 class="entry-title">%s</h1>', apply_filters('genesis_404_entry_title', __('Not found, error 404', 'genesis')));
    echo '<div class="entry-content">';
    if (genesis_html5()) {
        echo apply_filters('genesis_404_entry_content', '<p>' . sprintf(__('The page you are looking for no longer exists. Perhaps you can return back to the site\'s <a href="%s">homepage</a> and see if you can find what you are looking for. Or, you can try finding it by using the search form below.', 'genesis'), trailingslashit(home_url())) . '</p>');
        get_search_form();
    } else {
        ?>

			<p><?php 
        printf(__('The page you are looking for no longer exists. Perhaps you can return back to the site\'s <a href="%s">homepage</a> and see if you can find what you are looking for. Or, you can try finding it with the information below.', 'genesis'), trailingslashit(home_url()));
        ?>
</p>



	<?php 
    }
    if (!genesis_html5()) {
        genesis_sitemap('h4');
    } elseif (genesis_a11y('404-page')) {
        echo '<h2>' . __('Sitemap', 'genesis') . '</h2>';
        genesis_sitemap('h3');
    }
    echo '</div>';
    echo genesis_html5() ? '</article>' : '</div>';
}
开发者ID:Oak86,项目名称:matthewbuttler.work,代码行数:34,代码来源:404.php


示例2: pra_print_not_found

function pra_print_not_found()
{
    ?>
		<h3 class="center">No posts found. Try a different search?</h3>
		<?php 
    get_search_form();
}
开发者ID:edisplay,项目名称:wp-portfolio,代码行数:7,代码来源:functions.php


示例3: aaron_menu_search

 function aaron_menu_search($items, $args)
 {
     if ($args->theme_location == 'header') {
         $items = $items . '<li class="topsearch">' . get_search_form(false) . '</li>';
     }
     return $items;
 }
开发者ID:samfu1994,项目名称:personalWeb,代码行数:7,代码来源:functions.php


示例4: render_content

function render_content()
{
    ?>
	<?php 
    if (have_posts()) {
        ?>
		<div class="loop">
			<div class="loop-content">
				<?php 
        while (have_posts()) {
            // The Loop
            ?>
					<?php 
            the_post();
            ?>
					
					<div id="post-<?php 
            the_ID();
            ?>
" <?php 
            post_class();
            ?>
>
						<!-- title, meta, and date info -->
						<div class="entry-header clearfix">
							<h1 class="entry-title"><?php 
            the_title();
            ?>
</h1>
						</div>
						
						<!-- post content -->
						<div class="entry-content clearfix">
							<?php 
            the_content();
            ?>
						</div>
						
						<?php 
            get_search_form();
            ?>
					</div>
					<!-- end .post -->
				<?php 
        }
        // end of one post
        ?>
			</div>
		</div>
	<?php 
    } else {
        // do not delete
        ?>
		<?php 
        do_action('builder_template_show_not_found');
        ?>
	<?php 
    }
    // do not delete
}
开发者ID:jimrucinski,项目名称:Vine,代码行数:60,代码来源:page_search.php


示例5: add_search_box_to_menu

function add_search_box_to_menu($items, $args)
{
    if ($args->theme_location == 'primary') {
        return $items . get_search_form();
    }
    return $items;
}
开发者ID:jeffdfarr,项目名称:starkiller-wordpress-theme,代码行数:7,代码来源:functions.php


示例6: moesia_nav_bar

function moesia_nav_bar()
{
    echo '<div class="top-bar">
			<div class="container">
				<div class="site-branding col-md-4">';
    if (get_theme_mod('site_logo')) {
        echo '<a href="' . esc_url(home_url('')) . '" title="';
        bloginfo('name');
        echo '"><img class="site-logo" src="' . esc_url(get_theme_mod('site_logo')) . '" alt="';
        bloginfo('name');
        echo '" /></a>';
    } else {
        echo '<h1 class="site-title"><a href="' . esc_url(home_url('/')) . '" rel="home">';
        bloginfo('name');
        echo '</a></h1>';
        echo '<h2 class="site-description">';
        bloginfo('description');
        echo '</h2>';
    }
    echo '</div>';
    echo '<button class="menu-toggle btn"><i class="fa fa-bars"></i></button>
				<nav id="site-navigation" class="main-navigation col-md-8" role="navigation">';
    wp_nav_menu(array('theme_location' => 'primary'));
    echo '</nav>';
    if (get_theme_mod('toggle_search', 0)) {
        echo '<span class="nav-search"><i class="fa fa-search"></i></span>';
        echo '<span class="nav-deco"></span>';
        echo '<div class="nav-search-box">';
        get_search_form();
        echo '</div>';
    }
    echo '</div>';
    echo '</div>';
}
开发者ID:dramsoc,项目名称:dramsoc-theme-child-moesia,代码行数:34,代码来源:functions.php


示例7: widget

 function widget($args, $instance)
 {
     extract($args);
     echo $before_widget;
     ?>
     <?php 
     if ($instance['style'] == '1') {
         ?>
     <div class="cs-search search-popup">
         <a href="#" data-toggle="modal" data-target="#search-popup"><i class="fa fa-search"></i></a>
         <div id="search-popup" class="modal fade" role="dialog">
             <?php 
         echo get_search_form(true);
         ?>
         </div>
     </div>
     <?php 
     } else {
         ?>
     <div class="cs-search search-slider">
         <a href="javascript:void(0)"><i class="fa fa-search"></i></a>
         <div id="search-slider" class="hide">
             <?php 
         echo get_search_form(true);
         ?>
         </div>
     </div>
     <?php 
     }
     ?>
     <?php 
     echo $after_widget;
 }
开发者ID:daanbakker1995,项目名称:vanteun,代码行数:33,代码来源:search.php


示例8: pickle_top_utility

function pickle_top_utility()
{
    //the utility html starts here
    ?>
    <div class="top_container">
        <div class="top_container_content">
            <div id="login">
                <span class="loginout"><?php 
    wp_loginout();
    ?>
</span>
                <span class="register"><?php 
    wp_register('| ', '');
    ?>
</span>
            </div>
            <div id="greeting">
                <p>Please tell us what pickle pleases you. <span style="color:red;">Join Here</span></p>
            </div>
            <div class="search_form_container">
                <?php 
    get_search_form();
    ?>
            </div>
        </div>
    </div>
    <?php 
    //the utility html ends here
}
开发者ID:jhgreenblatt,项目名称:Pickle--Please,代码行数:29,代码来源:functions.php


示例9: section_template

    /**
     * Section template.
     */
    function section_template()
    {
        ?>
	<div class="notfound boomboard">
	<?php 
        if (current_user_can('edit_posts') && isset($_GET['boxes']) || isset($_GET['feature']) || isset($_GET['banners'])) {
            ?>

			<h2 class="notavail center"><?php 
            _e('Direct Previewing <em>of</em> &quot;Special Post Types&quot; Not Available... Yet', 'pagelines');
            ?>
</h2>
			<p class="subhead center"><?php 
            _e('Sorry, direct previewing of special post types such as <strong>features</strong> or <strong>boxes</strong> is unavailable. This WordPress functionality is new and rapidly developing, so it should be available soon.', 'pagelines');
            ?>
</p>
			<p class="subhead center">
				<?php 
            _e('To preview a &quot;custom post type&quot; just view a page with that &quot;section&quot; on it.', 'pagelines');
            ?>
			</p>

	<?php 
        } else {
            ?>

				<h2 class="hugetext center"><?php 
            _e('404!', 'pagelines');
            ?>
</h2>
				<p class="subhead center"><?php 
            _e('Sorry, This Page Does not exist.', 'pagelines');
            ?>
<br/><?php 
            _e('Go', 'pagelines');
            ?>
 <a href="<?php 
            echo home_url();
            ?>
"><?php 
            _e('home', 'pagelines');
            ?>
</a> <?php 
            _e('or try a search?', 'pagelines');
            ?>
</p>

	<?php 
        }
        ?>
		<div class="center fix"><?php 
        get_search_form();
        ?>
 </div>
	</div>
	<?php 
        pagelines_register_hook('pagelines_not_found_actions');
        // Hook
    }
开发者ID:climo,项目名称:PageLines-Framework,代码行数:62,代码来源:section.php


示例10: shortcode_handler

 function shortcode_handler($atts, $content = null)
 {
     ob_start();
     get_search_form();
     $ret_val = ob_get_contents();
     ob_end_clean();
     return $ret_val;
 }
开发者ID:hoonio,项目名称:PhoneAfrika,代码行数:8,代码来源:searchbar.php


示例11: add_search_box_to_menu

function add_search_box_to_menu($items, $args)
{
    if ($args->theme_location == 'primary') {
        $search = str_replace('"Search"', '">"', get_search_form(false));
    }
    $items .= '<li id="nav-search">' . $search . '</li>';
    return $items;
}
开发者ID:VanessaKing,项目名称:Taproot-ATRU,代码行数:8,代码来源:functions.php


示例12: tt_search

function tt_search($atts)
{
    // Attributes
    extract(shortcode_atts(array('name' => '', 'id' => ''), $atts));
    $tt_post_content = get_search_form();
    // code
    return $tt_post_content;
}
开发者ID:creative2020,项目名称:musclemetrics,代码行数:8,代码来源:shortcodes.php


示例13: fb_add_search_box

function fb_add_search_box($items, $args)
{
    // only on primary menu
    if ('primary' === $args->theme_location) {
        $items .= '<li class="menu-item menu-item-search">' . get_search_form(FALSE) . '</li>';
    }
    return $items;
}
开发者ID:aliciahurst,项目名称:cowboy-bear-ninja,代码行数:8,代码来源:functions.php


示例14: tc_404_content

 /**
  * The template part for displaying error 404 page content
  *
  * @package Customizr
  * @since Customizr 3.0
  */
 function tc_404_content()
 {
     if (!is_404()) {
         return;
     }
     $content_404 = apply_filters('tc_404', TC_init::$instance->content_404);
     echo apply_filters('tc_404_content', sprintf('<div class="%1$s"><div class="entry-content %2$s">%3$s</div>%4$s</div>', apply_filters('tc_404_wrapper_class', 'tc-content span12 format-quote'), apply_filters('tc_404_content_icon', 'format-icon'), sprintf('<blockquote><p>%1$s</p><cite>%2$s</cite></blockquote><p>%3$s</p>%4$s', call_user_func('__', $content_404['quote'], 'customizr'), call_user_func('__', $content_404['author'], 'customizr'), call_user_func('__', $content_404['text'], 'customizr'), get_search_form($echo = false)), apply_filters('tc_no_results_separator', '<hr class="featurette-divider ' . current_filter() . '">')));
 }
开发者ID:lokenxo,项目名称:familygenerator,代码行数:14,代码来源:class-content-404.php


示例15: nav_search

 /**
  * Add search to nav bar
  *
  * @return Norcrossv4
  */
 public function nav_search($items, $args)
 {
     ob_start();
     get_search_form();
     $searchform = ob_get_contents();
     ob_end_clean();
     $items .= '<li id="menu-item-0" class="menu-item search-nav">' . $searchform . '</li>';
     return $items;
 }
开发者ID:norcross,项目名称:norcross_v4,代码行数:14,代码来源:functions.php


示例16: sc_search_form

function sc_search_form() {
	ob_start();
	?>
	<div class="search">
		<?get_search_form()?>
	</div>
	<?
	return ob_get_clean();
}
开发者ID:rolandinsh,项目名称:Pegasus-Theme,代码行数:9,代码来源:shortcodes.php


示例17: rotary_add_search_box

function rotary_add_search_box($items)
{
    ob_start();
    get_search_form();
    $searchform = ob_get_contents();
    ob_end_clean();
    $items .= '<li class="search">' . $searchform . '</li>';
    return $items;
}
开发者ID:bogdanbrudiu,项目名称:rotary,代码行数:9,代码来源:theme-functions.php


示例18: widget

 function widget($args, $instance)
 {
     extract($args);
     $title = apply_filters('widget_title', empty($instance['title']) ? __('Search', 'cleanyetibasic') : $instance['title']);
     echo $before_widget;
     // Use current theme search form if it exists
     get_search_form();
     echo $after_widget;
 }
开发者ID:shoaibik,项目名称:clean-yeti-basic,代码行数:9,代码来源:widgets.php


示例19: add_search_box

function add_search_box($items, $args)
{
    ob_start();
    get_search_form();
    $searchform = ob_get_contents();
    ob_end_clean();
    $items .= '<li id="search-box-main-nav">' . $searchform . '</li>';
    return $items;
}
开发者ID:khanhhoang288,项目名称:thepphuongloan,代码行数:9,代码来源:SearchBox-On-Nav_Menu.php


示例20: bootswatch_search_form

/**
 * Search form
 *
 * @param  Array|String $classes Additional form classes.
 */
function bootswatch_search_form($classes = '')
{
    if (is_array($classes)) {
        $classes = implode(' ', $classes);
    }
    $form = str_replace('class="search', 'class="' . $classes . ' search', get_search_form(false));
    echo $form;
    // XSS OK.
}
开发者ID:kadimi,项目名称:bootswatch,代码行数:14,代码来源:search-form.php



注:本文中的get_search_form函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP get_search_link函数代码示例发布时间:2022-05-15
下一篇:
PHP get_search_feed_link函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap