Tagged: custom element, sidebar, Widget
-
AuthorPosts
-
October 8, 2025 at 5:43 pm #1489962
Hi Support! I would like to add a button Custom Element I created to a widget to use in a sidebar. I’ve looked around and can’ find advice of how to do that. Can you help? Thanks! Valerie
October 9, 2025 at 6:51 am #1489969Hey Valerie,
Thank you for the inquiry.
This is possible, but you will need to switch the builder to debug mode to enable the shortcode field. Once enabled, you can copy the shortcode of the element from the shortcode field and paste it into a Text or HTML widget. Please refer to the documentation below for more info.
— https://kriesi.at/documentation/enfold/intro-to-layout-builder/#debug-mode
Let us know how it goes.
Best regards,
IsmaelOctober 9, 2025 at 4:52 pm #1489983Hi Ismael, Thanks! if I do that, will it interfere with normal editing, etc., and site performance, or simply be an option in the advanced builder to access code as necessary? In other words, will it cause me any weirdness with my site when it moves from staging to live? Valerie
October 10, 2025 at 1:59 am #1489995I added it to the child theme functions.php but no field appeared on the page.
October 10, 2025 at 2:27 am #1489996In order to get to the code, I turned on block editing for code and found code below. It did put the button in a widget, but the font is supposed to be white on the button even on hover. The button background colors are right, the link work, but the font isn’t white. Any ideas?
[av_button label='Book A Discovery Call' icon_select='yes-right-icon' icon='forward' font='svg_entypo-fontello' title_attr='' button_type='' link='manually,https: (Email address hidden if logged out) /meetingtype/SVRwCe7HMUGxuT6WGxi68g2?bookingcode=be576115-ff4a-4f42-bc3c-696a8c305e44&anonymous&ep=mlink' link_dynamic='' link_target='' download_file='https://' attachment='' attachment_size='' downloaded_file_name='' size='large' position='center' label_display='' size-text='22' av-desktop-font-size-text='' av-medium-font-size-text='' av-small-font-size-text='' av-mini-font-size-text='' margin='' margin_sync='true' padding='15' padding_sync='true' av-desktop-margin='' av-desktop-margin_sync='true' av-desktop-padding='' av-desktop-padding_sync='true' av-medium-margin='' av-medium-margin_sync='true' av-medium-padding='' av-medium-padding_sync='true' av-small-margin='' av-small-margin_sync='true' av-small-padding='' av-small-padding_sync='true' av-mini-margin='' av-mini-margin_sync='true' av-mini-padding='' av-mini-padding_sync='true' color_options='color_options_advanced' color='theme-color' custom_bg='#444444' custom_font='#ffffff' btn_color_bg='theme-color-highlight' btn_custom_grad_direction='vertical' btn_custom_grad_1='#000000' btn_custom_grad_2='#ffffff' btn_custom_grad_3='' btn_custom_grad_opacity='0.7' btn_custom_bg='#444444' btn_color_bg_hover='theme-color' btn_custom_bg_hover='#444444' btn_color_font='theme-color' btn_custom_font='#ffffff' btn_color_font_hover='white' btn_custom_font_hover='#ffffff' border='' border_width='' border_width_sync='true' border_color='' border_radius='' border_radius_sync='true' box_shadow='' box_shadow_style='0px,0px,0px,0px' box_shadow_color='' animation='' animation_duration='' animation_custom_bg_color='' animation_z_index_curtain='100' hover_opacity='' sonar_effect_effect='' sonar_effect_color='' sonar_effect_duration='1' sonar_effect_scale='' sonar_effect_opac='0.5' css_position='' css_position_location=',,,' css_position_z_index='' av-desktop-css_position='' av-desktop-css_position_location=',,,' av-desktop-css_position_z_index='' av-medium-css_position='' av-medium-css_position_location=',,,' av-medium-css_position_z_index='' av-small-css_position='' av-small-css_position_location=',,,' av-small-css_position_z_index='' av-mini-css_position='' av-mini-css_position_location=',,,' av-mini-css_position_z_index='' id='' custom_class='' template_class='' element_template='4431' one_element_template='' av_uid='av-2g3zwf' sc_version='1.0' admin_preview_bg='']
October 10, 2025 at 6:55 am #1490002Hi,
Thank you for the update.
Good to know that you’ve found a workaround. We may need to inspect the site to properly investigate the styling issue. Please create a test page and provide the URL in the private field.
Best regards,
IsmaelOctober 10, 2025 at 5:00 pm #1490022Hi Ismael, test page info in private content. Thank you!
October 10, 2025 at 8:20 pm #1490031Hi,
The login that you posted is not working for me, please check the password.
The reason that the button in the sidebar doesn’t have white text is due to this custom css in your child theme:.sidebar a, .sidebar a > strong { color: #2997ab ! important; }note the class “sidebar”, to correct you could remove this css, or add this css:
.sidebar a.avia-button { color: #fff ! important; }After making your changes please clear your browser cache and check.
Best regards,
MikeOctober 11, 2025 at 9:28 pm #1490060Adding the sidebar button code worked, Mike. Thank you! We can close this thread.
-
AuthorPosts
- The topic ‘How to Put a Custom Element Button into a Sidebar Widget’ is closed to new replies.
