bobfries
Forum Replies Created
-
Similar problem here…
I want admin only to be able to edit the field so I don’t check the “Can user edit this field?” button. But it still can be edited when logged in as a non-admin user.
I’ve used the default profile form as this should be generic across all user roles.
http://sandbox1.nomadwebdesign.co.uk/wp-content/uploads/2019/03/user-edit.jpg
Forum: Themes and Templates
In reply to: [Storefront] Customize Storefront theme headerOdd, this isn’t working for me. It’s as if it comes before the functions of the main theme. So if I try to remove and element then add it with a different priority (see below), I end up with two of them. Any ideas?
remove_action( 'storefront_header', 'storefront_product_search', 40 ); add_action( 'storefront_header', 'storefront_product_search', 10 );Note: Have tried adding this using a child theme, and using the theme customisation module, it does the same. If I add the code to the bottom of the main storefront functions file it works.
Forum: Plugins
In reply to: [WC Variations Radio Buttons] How do I give variations different classes?I just hacked the file variable.php and replaced line 72:
print_attribute_radio( $checked_value, $option, $option, $sanitized_name );with this:
$optionClean = preg_replace('/[^A-Za-z0-9]/', "", $option); echo '<div class="option-' . $optionClean . '-wrapper">'; print_attribute_radio( $checked_value, $option, $option, $sanitized_name ); echo '</div>';This adds a div wrapper around each option with classes such as .option-VariationName-wrapper
- This reply was modified 8 years, 10 months ago by bobfries.