Tagged: enfold, enfold theme, footer
-
AuthorPosts
-
March 8, 2021 at 10:01 pm #1286561
I’ve reviewed the support threads about adding a 6th column to the footer on the enfold theme template. Unfortunately, every thread I read either had an outdated solution, or the links redirected to a dead-end.
Can you help me find a solution for adding 6-Columns to the Enfold template that still works today? (March 2021)
Thanks!
March 8, 2021 at 11:26 pm #1286573if you are working with a child-theme add this to your child-theme functions.php:
it will work without any other changings – because in footer.php there is allready a case 6: ;)function my_avf_option_page_data_change_elements( array $avia_elements = array() ){ /*** Example: Customize "Footer Columns Count" array*/ $slug = "footer"; $id = 'footer_columns'; $index = -1; /** Find index of element to change*/ foreach( $avia_elements as $key => $element ){ if( isset( $element['id'] ) && ( $element['id'] == $id ) && isset( $element['slug'] ) && ( $element['slug'] == $slug ) ){ $index = $key; break; } } /** * If key not found, return unmodified array*/ if( $index < 0 ){ return $avia_elements;} /*** Make your customizations*/ $avia_elements[ $index ]['subtype'] = array( __('1', 'avia_framework') =>'1', __('2', 'avia_framework') =>'2', __('3', 'avia_framework') =>'3', __('4', 'avia_framework') =>'4', __('5', 'avia_framework') =>'5', __('6', 'avia_framework') =>'6' ); return $avia_elements; } add_filter( 'avf_option_page_data_init', 'my_avf_option_page_data_change_elements', 10, 1 );
March 8, 2021 at 11:35 pm #1286574Thanks Guenni007. I tried putting it at the end of the function.php file but it didn’t do anything. Where in the code should I put it?
March 8, 2021 at 11:37 pm #1286575maybe 6 columns break to one column is a bad responsive behavior – so go and flex the layout for it f.e.:
in quick css:#footer .container { display: flex; flex-flow: row wrap; justify-content: space-between; } #footer .flex_column { width: unset !important; flex: 0 1 14%; margin-left: 0; } @media only screen and (max-width:1249px) { #footer .flex_column { width: unset !important; flex: 0 1 30%; } } @media only screen and (max-width:989px) { #footer .flex_column { width: unset !important; flex: 0 1 50%; } } @media only screen and (max-width:767px) { #footer .flex_column { width: unset !important; flex: 0 1 100%; } }
March 8, 2021 at 11:39 pm #1286576well if you got no child-theme the place to insert this is just before ( around line 831):
require_once( 'functions-enfold.php');
in functions.php there is a comment for that place:
/* * register custom functions that are not related to the framework but necessary for the theme to run */ put it in here
my advice is definitly to have a child-theme for enfold – all those nice snippets here from board are very easy to handle then – and are not lost on theme-update: https://kriesi.at/documentation/enfold/child-theme/
March 9, 2021 at 12:20 am #1286582Perfect! Child theme installed and everything works great. Thanks again!
March 9, 2021 at 2:06 am #1286590Hi,
I’m glad this was resolved. If you need additional help, please let us know here in the forums.
Best regards,
Jordan Shannon -
AuthorPosts
- The topic ‘2021 Enfold Theme Solution: 6-Columns in Footer’ is closed to new replies.