1. Home
  2. Knowledge Base
  3. WooCommerce Product Add-Ons Ultimate
  4. Display description directly under label
  1. Home
  2. Knowledge Base
  3. Product Page
  4. Display description directly under label
  1. Home
  2. Knowledge Base
  3. Advanced
  4. Display description directly under label

Display description directly under label

By default, add-on fields descriptions are displayed under the field input. You can move the description so that it displays with the field label by adding this snippet.

<?php
/**
* Move the description under the label for product add-ons
*/
function prefix_field_description_list_layout( $item, $id, $group_layout, $file ) {
pewc_field_description( $item, $id, $group_layout );
}
add_action( 'pewc_before_include_frontend_template', 'prefix_field_description_list_layout', 10, 4 );
// Remove the description field from after the field
remove_action( 'pewc_after_field_template', 'pewc_field_description_list_layout' );

Was this article helpful?

Related Articles