Answer the question
In order to leave comments, you need to log in
How to remove submenus in WordPress?
I am making a menu in the site header. An example is here . The site will be on the latest version of WordPress.
I'm using the twentynineteen theme.
The problem is that menu items that do not fit in length are removed under a special button.
How can I disable this button. And the menu items lined up in length. There are enough places.
Answer the question
In order to leave comments, you need to log in
In order not to receive such errors, you need to check whether the $subheadingvalues variable is empty. But it is so. In general, everything is written in the plugin itself. Attributes are displayed in the product in the "additional information" tab, let's see the code of this tab. plugins/woocommerce/templates/single-product/tabs/additional-information.php
The code there is <?php $product->list_attributes(); ?>
using the list_attributes() method; You can stop there and write in your template
global $product;
$product->list_attributes();
public function list_attributes() {
wc_get_template( 'single-product/product-attributes.php', array(
'product' => $this
) );
}
$attributes = $product->get_attributes();
.........
<?php foreach ( $attributes as $attribute ) :
if ( empty( $attribute['is_visible'] ) || ( $attribute['is_taxonomy'] && ! taxonomy_exists( $attribute['name'] ) ) ) {
continue;
} else {
$has_row = true;
}
?>
<tr class="<?php if ( ( $alt = $alt * -1 ) == 1 ) echo 'alt'; ?>">
<th><?php echo wc_attribute_label( $attribute['name'] ); ?></th>
<td><?php
if ( $attribute['is_taxonomy'] ) {
$values = wc_get_product_terms( $product->id, $attribute['name'], array( 'fields' => 'names' ) );
echo apply_filters( 'woocommerce_attribute', wpautop( wptexturize( implode( ', ', $values ) ) ), $attribute, $values );
} else {
// Convert pipes to commas and display values
$values = array_map( 'trim', explode( WC_DELIMITER, $attribute['value'] ) );
echo apply_filters( 'woocommerce_attribute', wpautop( wptexturize( implode( ', ', $values ) ) ), $attribute, $values );
}
?></td>
</tr>
<?php endforeach; ?>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question