• Resolved vmls23

    (@vmls23)


    Hey there,

    I’ve recently created a website using the Lightning theme, but now that the dust is settling and I am beginning to get a little better and designing the site, one thing I cannot get to work is to do more advanced customization of the themes initial layout.

    There is a footer divided into 3 separate areas. All 3 footer widget areas are locked in the Apperances > Widgets overview for me, and while I can create new blocks for each one, I cannot remove any.

    Frankly, I don’t have content for 3 individual footer columns, and it would look more elegant to just have 1 footer ranging the entire space instead. Since the footers are locked though, I guess can’t disable them. Widget Disable also failed. Is there anything else I can do, like another plugin?

    I’ve managed to dig out some footer.php in the files and tried to solve the issue by exchanging the value for footer areas from 3 to 1, which didn’t do anything. Which isnt bad coz the website didnt crash and I could undo the change, but I since I just started with all of this, I dont feel comfortable editing the code directly anyways. Anything I can do?

    Cheers

Viewing 5 replies - 1 through 5 (of 5 total)
  • Theme Author Hidekazu Ishikawa

    (@kurudrive)

    @vmls23 hi.

    Probably you are looking for is below right?

    child theme functions.php etc

    add_filter(
    	'lightning_footer_widget_area_count',
    	function() {
    		return 1;
    	}
    );
    Thread Starter vmls23

    (@vmls23)

    Hey!

    Thank you for your response, I very much appreciate it.

    I am very much a beginner with website design and am a bit scared to touch the theme file editor.

    Is there an easy, non-destructive way of changing the theme from 3 footer widgets areas to only 1 footer widget area?

    And another question that has come up recently if you don’t mind, is there a way to increase the possible slides in the home page slider (e.g. more than 3)?

    Best

    Theme Author Hidekazu Ishikawa

    (@kurudrive)

    @vmls23

    Yes. you are right.
    You should not customize from the theme editor.

    You can use child theme.

    https://developer.wordpress.org/themes/advanced-topics/child-themes/

    1. make below files

    lightning-child
    * style.css
    * functions.php

    2. style.css

    /*
    Theme Name: Lightning Child Sample
    Theme URI: 
    Template: lightning
    Description: 
    Author: 
    Tags: 
    Version: 0.6.0
    */

    3. functions.php

    <?php
    // Change number of footer widget area
    add_filter(
    	'lightning_footer_widget_area_count',
    	function() {
    		return 1;
    	}
    );
    // Change max number of slide
    add_filter(
    	'lightning_top_slide_count_max',
    	function() {
    		return 5;
    	}
    );
    

    4. zip “lightning-child” folder and upload your WordPress from appearance -> themes

    5. Activate Lightning Child Sample theme

    Thread Starter vmls23

    (@vmls23)

    Dear Mr. Ishikawa,

    Thank you so much!
    Since I’m new to WordPress i had not heard of the child theme function before.
    I followed your instructions and was able to change both aspects exactly as I wished. Thank you very much for the detailed explanation, I greatly appreciate it.

    Theme Author Hidekazu Ishikawa

    (@kurudrive)

    Your welcome 🙂

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘How to customize locked widget areas’ is closed to new replies.