Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #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!

    #1286573

    if 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 );
    #1286574

    Thanks 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?

    #1286575

    maybe 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%;
    	}
    }
    #1286576

    well 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/

    #1286582

    Perfect! Child theme installed and everything works great. Thanks again!

    #1286590

    Hi,

    I’m glad this was resolved. If you need additional help, please let us know here in the forums.

    Best regards,
    Jordan Shannon

Viewing 7 posts - 1 through 7 (of 7 total)

The topic ‘2021 Enfold Theme Solution: 6-Columns in Footer’ is closed to new replies.