wordpress woocommerce在结帐页面中显示面包屑吗? [英] wordpress woocommerce show breadcrumbs in checkout page?

查看:115
本文介绍了wordpress woocommerce在结帐页面中显示面包屑吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为我的一家商店中的 woocommerce 插件/wordpress.org/ rel = nofollow> wordpress 。在这里工作正常。现在,对于面包屑,它已经内置了面包屑功能。它的工作正常。现在,我需要结帐页面中的面包屑功能。但是woocommerce在除结帐页面之外的所有页面中都显示面包屑。所以有人可以告诉我如何解决这个问题。任何建议都是非常可取的。谢谢。

I am using woocommerce plugin for one of my store with wordpress. Here its working fine. Now for the breadcrumbs it has already in built breadcrumb feature in it. Its working fine. Now I want the breadcrumb feature in my checkout page. But woocommerce shows breadcrumb in all pages except checkout page. So can someone kindly tell me how to solve this issue. Any suggestions will be really appreciable. Thanks.

推荐答案

可能对您有帮助
在WooCommerce中,您需要两个文件来更改面包屑。您将在WooCommerce插件目录中找到这些文件

May be helpfull for you There are two files you need to change your breadcrumb's in WooCommerce. You'll find those files in your WooCommerce plugin directory

第一个模板文件:

if ( ! function_exists( 'woocommerce_breadcrumb' ) ) {

/**
 * Output the WooCommerce Breadcrumb
 *
 * @access public
 * @return void
 */
function woocommerce_breadcrumb( $args = array() ) {

$defaults = array(
    'delimiter'  => ' › ',
    'wrap_before'  => '<div id="breadcrumb" itemprop="breadcrumb">',
    'wrap_after' => '</div>',
    'before'   => '',
    'after'   => '',
    'home'    => null
);

$args = wp_parse_args( $args, $defaults  );

woocommerce_get_template( 'shop/breadcrumb.php', $args );
}
}

第二个文件:/ woocommerce / templates / shop / Breadcrumb.php,它是WooCommerce中面包屑组件的模板文件。这是woocommerce_breadcrumb()函数将调用的模板文件。

The second file: /woocommerce/templates/shop/breadcrumb.php, it's the template file for breadcrumb component in WooCommerce. This is the template file that will be called by the woocommerce_breadcrumb() function.

这篇关于wordpress woocommerce在结帐页面中显示面包屑吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆