Hey,
So i’ve been creating custom ALB elements following this tutorial and it works fine but i’d like to create custom full width elements, i’ve tried replicating section.php but it looks like it doesn’t inherit its fullwidth-ness.
Thanks.
Hi Joe!
Try the following, open /config-templatebuilder/config.php and look for this line:
$builder->setFullwidthElements( array('av_revolutionslider', 'av_layerslider' ,'av_slideshow_full', 'av_fullscreen', 'av_masonry_entries','av_masonry_gallery', 'av_google_map', 'av_slideshow_accordion', 'av_image_hotspot', 'av_portfolio', 'av_submenu', 'av_layout_row', 'av_button_big','av_feature_image_slider') );
Replace it by:
$builder->setFullwidthElements( array('CUSTOM_SHORTCODE_HERE', av_revolutionslider', 'av_layerslider' ,'av_slideshow_full', 'av_fullscreen', 'av_masonry_entries','av_masonry_gallery', 'av_google_map', 'av_slideshow_accordion', 'av_image_hotspot', 'av_portfolio', 'av_submenu', 'av_layout_row', 'av_button_big','av_feature_image_slider') );
Change CUSTOM_SHORTCODE_HERE
for the shortcode of the custom ALB element you want to be fullwidth.
Best regards,
Josue
Thanks, that works. It is possible to have this modification on a child theme?
Hm, no not right now unfortunately, but maybe we could add a hook there so you could modify the array via child theme functions.php, i’ll see what i can do.
Regards,
Josue
A way to hook into FWD elements will be added in the next patch, it will work like this:
function custom_fwd_elements($arr) {
$arr[] = 'custom_shortcode'
return $arr;
}
add_filter('avf_fwd_elements', 'custom_fwd_elements', 10, 1);