Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #1344748

    Is there a way to add more than 8 columns in Partner Logo element?

    Best,
    Schalk

    #1344821

    Hey lkhst,

    Thank you for the inquiry.

    You have to modify the enfold/config-templatebuilder/avia-shortcodes/logoslider/logoslider.php file and look for this code around line 314.

    <strong>
    			$c = array(
    
    						array(
    								'type'			=> 'template',
    								'template_id'	=> 'columns_count_icon_switcher',
    								'std'			=> array(
    														'default'	=> '3'
    													),
    								'lockable'		=> true,
    								'heading'		=> array(),
    								'id_sizes'		=>	array(
    														'default'	=> 'columns'
    													),
    								'subtype'		=> array(
    														'default'	=> array(
    																	__( '1 Columns', 'avia_framework' )	=> '1',
    																	__( '2 Columns', 'avia_framework' )	=> '2',
    																	__( '3 Columns', 'avia_framework' )	=> '3',
    																	__( '4 Columns', 'avia_framework' )	=> '4',
    																	__( '5 Columns', 'avia_framework' )	=> '5',
    																	__( '6 Columns', 'avia_framework' )	=> '6',
    																	__( '7 Columns', 'avia_framework' )	=> '7',
    																	__( '8 Columns', 'avia_framework' )	=> '8',
    																)
    													)
    							),
    						);
    

    You can increase the number of columns in the dropdown by editing the subtype array and adding more column options.

    You can then modify this block of code around line 1120 and add new grid_class for the additional column options.

    switch( $this->config['columns'] )
    				{
    					case '1':
    						$this->grid_class = 'av_fullwidth';
    						break;
    					case '2':
    						$this->grid_class = 'av_one_half';
    						break;
    					case '3':
    						$this->grid_class = 'av_one_third';
    						break;
    					case '4':
    						$this->grid_class = 'av_one_fourth';
    						break;
    					case '5':
    						$this->grid_class = 'av_one_fifth';
    						break;
    					case '6':
    						$this->grid_class = 'av_one_sixth';
    						break;
    					case '7':
    						$this->grid_class = 'av_one_seventh';
    						break;
    					case '8':
    						$this->grid_class = 'av_one_eighth';
    						break;
    					default:
    						$this->grid_class = 'av_one_third';
    						break;
    				}
    

    You may also need to add css for the new columns.

    Best regards,
    Ismael

    #1344823

    Thanks for the answer Ismael,
    I have changed the code as you instructed, but the new column that was created is not added correctly but on a new line. What am I missing?
    I will leave the URL in the private content for you to see.. bottom of the page..
    This site is not using a child theme.

    #1344827

    Actually I figured it out.
    I forgot to change ‘av_one_eighth’ to ‘av_one_nineth’ :)

    #1344843

    Hi,

    Great, I’m glad that you got it working, and thanks for the update. Please let us know if you should need any further help on the topic or if we can close it.

    Best regards,
    Rikard

    #1346543

    Hi Rikard, I also need to do this for an enfold child theme.
    Can you explain to me or point me to information that explains how to do this in the child theme as there is no /logoslider.php file?

    #1346722

    Hi,

    Thank you for the update.

    You have to create a folder called “shortcodes” in the child theme directory, and add this code in the functions.php file to register the new shortcode path.

    
    /**
     *    Add filter to add or replace Enfold ALB shortcodes with new folder contents
     *
     *    Note that the shortcodes must be in the same format as those in
     *    enfold/config-templatebuilder/avia-shortcodes
     *
     *    @link http://kriesi.at/documentation/enfold/add-new-or-replace-advanced-layout-builder-elements-from-child-theme/
     *
     * @param array $paths
     * @return array
     */
    function avia_include_shortcode_template($paths)
    {
        $helper_files = $paths[0];
        $template_url = get_stylesheet_directory();
        array_unshift($paths, $template_url . '/shortcodes/');
        return $paths;
    }
    
    add_filter('avia_load_shortcodes', 'avia_include_shortcode_template', 15, 1);
    
    

    You can now create copies of the shortcode inside the new folder and do your own modifications to the element.

    Best regards,
    Ismael

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.