我没有主商店页面,只有产品类别。Woocommerce 面包屑总是在我需要删除的面包屑中显示“商店”痕迹。在 Woo 文档中,我只能提供有关如何更改“home”slug 或分隔符,或如何完全删除面包屑的信息。我如何简单地删除“商店”线索?
编辑:我不想更改/更改“商店”路径的名称/链接,而是将其完全删除!
我有一排有两列,都是50%.左边有一个图像,右边有一个文本.我的HTML:
.row{
display:flex;
flex-direction:row;
align-items:center;
}
.cell1, .cell2{
width:50%;
}
.cell2 {
background: green;
}Run Code Online (Sandbox Code Playgroud)
<div class="row">
<div class="cell1"><img src="https://via.placeholder.com/450x450" ></div>
<div class="cell2">Cell 2</div>
</div>Run Code Online (Sandbox Code Playgroud)
现在我想要cell2的背景是绿色的,并且需要cell2与cell1的高度相同,我知道我可以通过给出这个背景的行来实现它,但是我怎么才让cell2的背景变成绿色(并且具有相同的高度为cell1)?
在 WooCommerce 中,我为每个产品添加了一个自定义字段“描述”。我找到了一种同时显示标签名称和值的方法:
add_filter( 'woocommerce_add_cart_item_data', 'save_days_field', 10, 2 );
function save_days_field( $cart_item_data, $product_id ) {
$special_item = get_post_meta( $product_id , 'description',true );
if(!empty($special_item)) {
$cart_item_data[ 'description' ] = $special_item;
// below statement make sure every add to cart action as unique line item
$cart_item_data['unique_key'] = md5( microtime().rand() );
WC()->session->set( 'description', $special_item );
}
return $cart_item_data;
}
// Render meta on cart and checkout
add_filter( 'woocommerce_get_item_data','rendering_meta_field_on_cart_and_checkout', 10, 2 );
function rendering_meta_field_on_cart_and_checkout( $cart_item_data, $cart_item ) {
if( isset( $cart_item['description'] ) ) { …Run Code Online (Sandbox Code Playgroud)