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

PHP get_product_search_form函数代码示例

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

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



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

示例1: oggi_header

function oggi_header()
{
    ?>
		<img id="logo" src="http://oggi.pushbrand.com/wp-content/uploads/2015/08/oggi-logo.png" />
	<?php 
    get_product_search_form();
}
开发者ID:anthonybrown,项目名称:oggi,代码行数:7,代码来源:functions.php


示例2: search_shortcode

function search_shortcode()
{
    ob_start();
    get_product_search_form();
    $content = ob_get_contents();
    ob_end_clean();
    return $content;
}
开发者ID:javipaur,项目名称:TiendaVirtual,代码行数:8,代码来源:search.php


示例3: widget

 /**
  * widget function.
  *
  * @see WP_Widget
  * @access public
  * @param array $args
  * @param array $instance
  * @return void
  */
 function widget($args, $instance)
 {
     extract($args);
     $title = $instance['title'];
     $title = apply_filters('widget_title', $title, $instance, $this->id_base);
     echo $before_widget;
     if ($title) {
         echo $before_title . $title . $after_title;
     }
     get_product_search_form();
     echo $after_widget;
 }
开发者ID:k2jysy,项目名称:mergeshop,代码行数:21,代码来源:widget-product-search.php


示例4: search_shortcode

function search_shortcode($atts)
{
    extract(shortcode_atts(array('size' => 'normal'), $atts));
    if ($size == 'small') {
        $size = 'style="font-size:80%"';
    }
    if ($size == 'large') {
        $size = 'style="font-size:150%"';
    }
    if ($size == 'xlarge') {
        $size = 'style="font-size:200%"';
    }
    ob_start();
    echo '<div class="ux-search-box" ' . $size . '>';
    get_product_search_form();
    echo '</div>';
    $content = ob_get_contents();
    ob_end_clean();
    return $content;
}
开发者ID:B1aZer,项目名称:yaltatoys_wp,代码行数:20,代码来源:search.php


示例5: thb_quick_search

function thb_quick_search()
{
    $search_results = ot_get_option('search_results');
    ?>
	<a href="#searchpopup" rel="inline" data-class="quick-search" id="quick_search"><i class="fa fa-search"></i></a>
	<aside id="searchpopup" class="mfp-hide">
		<div class="row">
			<div class="small-12 columns">
				<?php 
    if ($search_results == 'products') {
        get_product_search_form();
    } else {
        get_search_form();
    }
    ?>
			</div>
		</div>
	</aside>
<?php 
}
开发者ID:developmentDM2,项目名称:CZND,代码行数:20,代码来源:misc.php


示例6: get_product_search_form

<?php

/**
 * The Sidebar containing the main widget areas.
 *
 * @package Home Word
 */
?>
	<aside class="sidebar-section store-sidebar">
		<?php 
get_product_search_form();
?>
		<h3>Categories</h3>
		<ul>
		<?php 
wp_list_categories(array('taxonomy' => 'product_cat', 'title_li' => ''));
?>
		</ul>
		<h3>Format</h3>
		<?php 
wp_nav_menu(array('theme_location' => 'format', 'menu_class' => 'cust-service', 'container' => false));
?>
		<h3>Author</h3>
		<ul>
		<?php 
wp_nav_menu(array('theme_location' => 'author', 'menu_class' => 'cust-service', 'container' => false));
?>
		</ul>
		<h3>Customer Service</h3>
		<?php 
wp_nav_menu(array('theme_location' => 'cust', 'menu_class' => 'cust-service', 'container' => false));
开发者ID:CmdTab,项目名称:Homeword,代码行数:31,代码来源:sidebar-shop.php


示例7: highwind_woocommerce_product_search

/**
 * Displays the product search in the header if the options specify it
 * @since 1.1.0
 */
function highwind_woocommerce_product_search()
{
    $options = get_option('highwind_woocommerce_options');
    $header_search = $options['header_search'];
    if ($header_search && !is_checkout()) {
        echo '<div class="highwind-product-search">';
        get_product_search_form();
        echo '</div>';
    }
}
开发者ID:hkarriche,项目名称:wordpress,代码行数:14,代码来源:template.php


示例8: widget

 /**
  * widget function.
  *
  * @see WP_Widget
  *
  * @param array $args
  * @param array $instance
  */
 function widget($args, $instance)
 {
     $this->widget_start($args, $instance);
     get_product_search_form();
     $this->widget_end($args);
 }
开发者ID:slavic18,项目名称:cats,代码行数:14,代码来源:class-wc-widget-product-search.php


示例9: flatsome_mobile_menu

function flatsome_mobile_menu()
{
    global $flatsome_opt, $woocommerce;
    ?>

<!-- Mobile Popup -->
<div id="jPanelMenu" class="mfp-hide">
    <div class="mobile-sidebar">
        <?php 
    if ($flatsome_opt['catalog_mode']) {
        ?>
        <ul class="html-blocks">
            <li class="html-block">
                 <?php 
        echo do_shortcode($flatsome_opt['catalog_mode_header']);
        ?>
            </li>
        </ul>
        <?php 
    }
    ?>

        <ul class="mobile-main-menu">
        <?php 
    if ($flatsome_opt['search_pos'] !== 'hide') {
        ?>
        <li class="search">
            <?php 
        if (function_exists('get_product_search_form')) {
            get_product_search_form();
        } else {
            get_search_form();
        }
        ?>
    
        </li><!-- .search-dropdown -->
        <?php 
    }
    ?>

        <?php 
    if (has_nav_menu('primary_mobile')) {
        // Load custom mobile menu if set
        wp_nav_menu(array('theme_location' => 'primary_mobile', 'container' => false, 'items_wrap' => '%3$s', 'depth' => 0));
    } else {
        // Load default menu
        wp_nav_menu(array('theme_location' => 'primary', 'container' => false, 'items_wrap' => '%3$s', 'depth' => 0));
    }
    ?>

        <?php 
    if (ux_is_woocommerce_active() && $flatsome_opt['myaccount_dropdown']) {
        ?>

        <li class="menu-item menu-account-item menu-item-has-children">
            <?php 
        if (is_user_logged_in()) {
            ?>
 
                <a href="<?php 
            echo get_permalink(get_option('woocommerce_myaccount_page_id'));
            ?>
">
                    <?php 
            _e('My Account', 'woocommerce');
            ?>
                </a>
                <ul class="sub-menu">
                <?php 
            if (has_nav_menu('my_account')) {
                ?>
                <?php 
                wp_nav_menu(array('theme_location' => 'my_account', 'container' => false, 'items_wrap' => '%3$s', 'depth' => 0));
                ?>
                <?php 
            } else {
                ?>
                    <li>Define your My Account dropdown menu in <b>Appearance > Menus</b></li>
                <?php 
            }
            ?>
 
                </ul>

            <?php 
        } else {
            ?>
            <a href="<?php 
            echo get_permalink(get_option('woocommerce_myaccount_page_id'));
            ?>
"><?php 
            _e('Login', 'woocommerce');
            ?>
</a>
            <?php 
        }
        ?>
                      
        </li>
        <?php 
//.........这里部分代码省略.........
开发者ID:bqevin,项目名称:wp-shopeasy,代码行数:101,代码来源:header.php


示例10: kt_add_search_form_to_menu

function kt_add_search_form_to_menu($items, $args)
{
    if (!($args->theme_location == 'primary_navigation')) {
        return $items;
    }
    global $pinnacle, $woocommerce;
    ob_start();
    ?>
    <?php 
    if (class_exists('woocommerce')) {
        ?>
    <?php 
        if (isset($pinnacle['menu_cart']) && $pinnacle['menu_cart'] == '1') {
            ?>
    <li class="menu-cart-icon-kt panel"><a class="menu-cart-btn collapsed" data-toggle="collapse" data-parent="#kad-shrinkheader" data-target=".kad-head-cart-popup">
      <span class="kt-cart-text"><?php 
            echo __('Your Cart', 'pinnacle');
            ?>
</span><i class="kt-icon-basket2"></i><span class="kt-cart-total"><?php 
            echo $woocommerce->cart->cart_contents_count;
            ?>
</span>
    </a>
    <div id="kad-head-cart-popup" class="collapse kad-head-cart-popup"><div class="kt-header-mini-cart-refreash"><?php 
            woocommerce_mini_cart();
            ?>
</div></div></li>
    <?php 
        }
    }
    ?>
    <?php 
    if (isset($pinnacle['menu_search']) && $pinnacle['menu_search'] == '1') {
        ?>
      <li class="menu-search-icon-kt panel"><a class="menu-search-btn collapsed" data-toggle="collapse" data-parent="#menu-main-menu" data-target="#kad-menu-search-popup"><i class="kt-icon-search4"></i></a>
        <div id="kad-menu-search-popup" class="collapse">
          <?php 
        if (isset($pinnacle['menu_search_products']) && $pinnacle['menu_search_products'] == '1') {
            ?>
            <?php 
            get_product_search_form();
            ?>
          <?php 
        } else {
            ?>
            <?php 
            get_search_form();
            ?>
          <?php 
        }
        ?>
        </div>
      </li>
    <?php 
    }
    ?>
   <?php 
    $output = ob_get_contents();
    ob_end_clean();
    return $items . $output;
}
开发者ID:pcuervo,项目名称:od4d,代码行数:61,代码来源:custom-header.php


示例11: search_shortcode

function search_shortcode()
{
    return get_product_search_form();
}
开发者ID:shubham79,项目名称:Jhintaak,代码行数:4,代码来源:search.php


示例12: cruxstore_add_search_full

function cruxstore_add_search_full()
{
    if (cruxstore_option('header_search', 1)) {
        $header_search_type = cruxstore_option('header_search_type', 'all');
        if ($header_search_type == 'product' && cruxstore_is_wc()) {
            $search = get_product_search_form(false);
        } else {
            $search = get_search_form(false);
        }
        printf('<div id="%1$s" class="%2$s">%3$s</div>', 'search-fullwidth', 'mfp-hide mfp-with-anim', $search);
    }
}
开发者ID:websideas,项目名称:Mondova,代码行数:12,代码来源:functions.php


示例13: cruxstore_show_slideshow

 /**
  * Show slideshow of page
  *
  * @param $post_id
  *
  */
 function cruxstore_show_slideshow($post_id = null)
 {
     global $post;
     if (!$post_id) {
         $post_id = $post->ID;
     }
     $slideshow = cruxstore_meta('_cruxstore_slideshow_type', array(), $post_id);
     $sideshow_class = array();
     $output = '';
     if ($slideshow == 'revslider' || $slideshow == 'search') {
         $revslider = cruxstore_meta('_cruxstore_rev_slider', array(), $post_id);
         if ($revslider && class_exists('RevSlider')) {
             ob_start();
             putRevSlider($revslider);
             $revslider_html = ob_get_contents();
             ob_end_clean();
             $output .= $revslider_html;
         }
         if ($slideshow == 'search') {
             if (cruxstore_is_wc()) {
                 $search = get_product_search_form(false);
             } else {
                 $search = get_search_form(false);
             }
             $output .= '<div class="searchform-wrap"><div class="container"><div class="searchform-inner">' . $search . '</div></div></div>';
         }
     } elseif ($slideshow == 'layerslider') {
         $layerslider = cruxstore_meta('_cruxstore_layerslider', array(), $post_id);
         if ($layerslider && is_plugin_active('LayerSlider/layerslider.php')) {
             $layerslider_html = do_shortcode('[layerslider id="' . $layerslider . '"]');
             if ($layerslider_html) {
                 $output .= $layerslider_html;
             }
         }
     } elseif ($slideshow == 'custom') {
         $customslider = cruxstore_meta('_cruxstore_slideshow_custom', array(), $post_id);
         $output .= do_shortcode($customslider);
     }
     if ($output != '') {
         printf('<div id="main-slideshow" class="%s"><div id="sideshow-inner">%s</div></div>', esc_attr(implode(' ', $sideshow_class)), $output);
     }
 }
开发者ID:websideas,项目名称:Mondova,代码行数:48,代码来源:helpers.php


示例14: kt_add_search_form_to_menu

function kt_add_search_form_to_menu($items, $args)
{
    global $virtue_premium, $woocommerce;
    if (!($args->theme_location == 'primary_navigation') || isset($virtue_premium['header_style']) && $virtue_premium['header_style'] == "center") {
        return $items;
    }
    ob_start();
    ?>
    <?php 
    if (class_exists('woocommerce')) {
        ?>
    <?php 
        if (isset($virtue_premium['menu_cart']) && $virtue_premium['menu_cart'] == '1') {
            ?>
    <li class="menu-cart-icon-kt sf-dropdown">
    <a class="menu-cart-btn" title="<?php 
            echo __('Your Cart', 'virtue');
            ?>
" href="<?php 
            echo esc_url($woocommerce->cart->get_cart_url());
            ?>
">
      <div class="kt-cart-container"><i class="icon-cart"></i><span class="kt-cart-total"><?php 
            echo $woocommerce->cart->get_cart_contents_count();
            ?>
</div></span>
    </a>
    <ul id="kad-head-cart-popup" class="sf-dropdown-menu kad-head-cart-popup">
        <div class="kt-header-mini-cart-refreash">
        <?php 
            woocommerce_mini_cart();
            ?>
        </div>
      </ul>
    </li>
    <?php 
        }
    }
    ?>
    <?php 
    if (isset($virtue_premium['menu_search']) && $virtue_premium['menu_search'] == '1') {
        ?>
    <li class="menu-search-icon-kt">
      <a class="kt-menu-search-btn collapsed" title="<?php 
        echo __('Search', 'virtue');
        ?>
" data-toggle="collapse" data-target="#kad-menu-search-popup">
        <i class="icon-search"></i>
      </a>
        <div id="kad-menu-search-popup" class="search-container container collapse">
          <div class="kt-search-container">
          <?php 
        if (isset($virtue_premium['menu_search_woo']) && $virtue_premium['menu_search_woo'] == '1') {
            get_product_search_form();
        } else {
            get_search_form();
        }
        ?>
          </div>
        </div>
    </li>
    <?php 
    }
    ?>
   <?php 
    $output = ob_get_contents();
    ob_end_clean();
    return $items . $output;
}
开发者ID:MikeBu,项目名称:wp-fm.com,代码行数:69,代码来源:custom.php


示例15: sprintf

        $items_wrap .= sprintf('<li class="menu-item menu-item-currency"><a href="#">%s</a><ul class="sub-menu-dropdown">%s</ul></li>', esc_html__('Currency', 'cruxstore') . ': ' . $currency_active, $currency_html);
    }
    if (!cruxstore_option('catalog_mode', 0)) {
        $text = is_user_logged_in() ? esc_html__('My Account', 'cruxstore') : esc_html__('Login', 'cruxstore');
        $items_wrap .= sprintf('<li class="menu-item menu-item-myaccount"><a href="%s">call %s</a>', get_permalink(get_option('woocommerce_myaccount_page_id')), $text);
        if (defined('YITH_WCWL')) {
            global $yith_wcwl;
            $wishlist = sprintf('<a href="%s">%s</a>', esc_url($yith_wcwl->get_wishlist_url()), esc_html__('wishlist', 'cruxstore'));
            $items_wrap .= sprintf('<li class="menu-item menu-item-wishlist">%s</li>', $wishlist);
        }
    }
}
if (cruxstore_option('header_search', 1)) {
    $header_search_type = cruxstore_option('header_search_type', 'all');
    if ($header_search_type == 'product' && cruxstore_is_wc()) {
        $search = get_product_search_form(false);
    } else {
        $search = get_search_form(false);
    }
    $items_wrap .= sprintf('<li class="menu-item menu-item-search-form">%s</li>', $search);
}
$primary = cruxstore_get_mainmenu();
if (!$primary['custom']) {
    if (has_nav_menu($primary['menu'])) {
        wp_nav_menu(array('theme_location' => $primary['menu'], 'container' => 'nav', 'container_class' => 'main-nav-mobile', 'container_id' => 'main-nav-mobile', 'menu_class' => 'menu navigation-mobile', 'link_before' => '<span>', 'link_after' => '</span>', 'walker' => new KTMegaWalker(), 'items_wrap' => '<ul id="%1$s" class="%2$s">%3$s' . $items_wrap . '</ul>'));
    } else {
        printf('<nav id="main-nav-mobile" class="main-nav-mobile"><ul class="menu navigation-mobile"><li><a href="%s">%s</a></li>%s</ul></nav>', admin_url('nav-menus.php'), esc_html__("Define your site main menu!", 'cruxstore'), $items_wrap);
    }
} else {
    wp_nav_menu(array('menu' => $primary['menu'], 'container' => 'nav', 'container_class' => 'main-nav-mobile', 'container_id' => 'main-nav-mobile', 'menu_class' => 'menu navigation-mobile', 'link_before' => '<span>', 'link_after' => '</span>', 'walker' => new KTMegaWalker(), 'items_wrap' => '<ul id="%1$s" class="%2$s">%3$s' . $items_wrap . '</ul>'));
}
开发者ID:websideas,项目名称:Mondova,代码行数:31,代码来源:header-mobilenav.php


示例16: cruxstore_category_menu

function cruxstore_category_menu()
{
    global $wp_query;
    $current_cat = is_product_category() ? $wp_query->queried_object->term_id : '';
    $page_id = wc_get_page_id('shop');
    $page_url = get_permalink($page_id);
    $all_categories_class = '';
    if (!is_product_category() && !is_product_tag() && !isset($_REQUEST['s'])) {
        $all_categories_class = ' class="current-cat"';
    }
    $output = '<li' . $all_categories_class . '><a href="' . esc_url($page_url) . '">' . esc_html__('All', 'cruxstore') . '</a></li>';
    $orderby = cruxstore_option('shop_header_orderby', 'slug');
    $order = cruxstore_option('shop_header_order', 'ASC');
    $categories = get_categories($args = array('type' => 'post', 'orderby' => $orderby, 'order' => $order, 'hide_empty' => 1, 'taxonomy' => 'product_cat', 'parent' => 0));
    foreach ($categories as $category) {
        $output .= cruxstore_category_list_item($category, $current_cat);
    }
    $shop_header_filters = '';
    $search = cruxstore_option('shop_header_search', 1);
    if ($search) {
        $shop_header_filters .= '<li class="wc-header-search">' . get_product_search_form(false) . '</li>';
    }
    $shop_header_filters .= sprintf('<li class="wc-header-categories"><a href="#cruxstore-shop-categories">%s</a></li>', esc_html__('Categories', 'cruxstore'));
    $filters = cruxstore_option('shop_header_filters', 1);
    $filters_html = '';
    if ($filters) {
        $shop_header_filters .= sprintf('<li class="wc-header-filter"><a href="#cruxstore-shop-filters">%s</a></li>', esc_html__('Filter', 'cruxstore'));
        ob_start();
        echo '<div class="clearfix"></div><div id="cruxstore-shop-filters" class="row multi-columns-row"><div id="cruxstore-shop-filters-content">';
        dynamic_sidebar('shop-filter-area');
        echo '</div></div>';
        $filters_html = ob_get_clean();
    }
    if ($shop_header_filters) {
        $shop_header_filters = '<div class="shop-header-right"><ul class="shop-header-list">' . $shop_header_filters . '</ul></div>';
    }
    printf('%s<div class="shop-header-left"><ul id="shop-header-categories" class="shop-header-list">%s</ul></div>%s', $shop_header_filters, $output, $filters_html);
}
开发者ID:websideas,项目名称:Mondova,代码行数:38,代码来源:woocommerce.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP get_products函数代码示例发布时间:2022-05-15
下一篇:
PHP get_product_name函数代码示例发布时间: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