Forum Replies Created
- AuthorPosts
- cartaclaudioParticipant
Thanks this works great like this
add_filter( 'wcfm_custom_field_value', function( $field_value, $field_name, $product_id, $field_type ) { if( $field_type == 'checkbox' ) { if( $field_value == 'no' ) { add_filter( 'wcfm_is_allow_custom_field_display_by_icon', '__return_false' ); $field_value = ''; } else { if( $field_name == 'explicit' ) { add_filter( 'wcfm_is_allow_custom_field_display_by_icon', '__return_false' ); $field_value = '<img src="http://XXXXXXX/wp-content/themes/themify-music-child/images/explicit.png" width="64px" />'; }else { $field_value = get_post_meta( $product_id, $field_name.'_checkbox', true ); } } } return $field_value; }, 50, 4 );
is there a filter I can use to hide the checkboxes name from appearing in a label?
cartaclaudioParticipantHi,
I have been testing a playing around with this one, however it does not work. When the field_value is ” its returning everything as checked instead of hiding the value.
cartaclaudioParticipantHi,
I have added this code to functions.php, the function is getting in but when the field_values are no(tested by var_dump) they are still producing the checkbox post meta.
October 25, 2019 at 1:32 pm in reply to: Stores Page to filter to show only stores you follow #89010cartaclaudioParticipantThis reply has been marked as private.October 14, 2019 at 12:36 pm in reply to: Stores Page to filter to show only stores you follow #86795cartaclaudioParticipantThanks would I need to change any of the code from my store list page?
cartaclaudioParticipantThank you so much. with this code it displays the word no instead of an icon. is it possible to not display the field at all if left unchecked?
Regards,
ClaudiocartaclaudioParticipantHi,
I am using buddypress to make the profiles public.
Thank you.
- AuthorPosts