badget

Biggest Sale! Special Offer!

Get 30% discount on all of our single themes with this coupon code: #30%SALE

Hurry up! *Limited time offer*

Full width footer widget ?

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #43778
    david.pagnon88
    Participant

    Hello,

    I’ve got an annoying, and possibly simple question. Let’s begin by saying I’m using the interface theme.
    I don’t want three columns on my footer, I just want one full width.
    I’m trying to see how to change it. Don’t worry I’m sing a child theme but let’s pretend I’m not so that it’s more simple to explain.

    There is an easy and unelegant way to do so, which is changing in the style.css file the width of the class .one-third from 30.36% to 100%.
    But I would like to do it in a clean way, in case I want to use this class the way it has been designed. The issue is, that I can’t find any php line which refers to it ! Do you know in which file and which paragraph I can find a way to make my footer widget full-width ?

    Thanks a lot in advance !

    David

    PS: One additional question: There is this paragraph in interface_widgets.php that I’m not sure I totally understand. Where can I actually find the first and the second variable that are called by %1$s and %2$s ?
    register_sidebar( array(
    ‘name’ => __( ‘Footer – Column1’, ‘interface’ ),
    ‘id’ => ‘interface_footer_sidebar’,
    ‘description’ => __( ‘Shows widgets at footer Column 1.’, ‘interface’ ),
    ‘before_widget’ => ‘<aside id=”%1$s” class=”widget %2$s”>’,
    ‘after_widget’ => ‘</aside>’,
    ‘before_title’ => ‘<h2 class=”widget-title”>’,
    ‘after_title’ => ‘</h2>’
    ) );

    #43813

    Hi David,

    %1$s and %2$s uses the first and second parameter of widgets and it is called dynamically. If you drag nav menu widget then it will display nav-menu similarly for others. If you like to change it to full width then you need to add your own div instead of using one-third then goto theme folder -> inc -> structure -> sidebar-extension.php on line no 73, 84 and 94, create a new div class and write the css for it at custom css or child theme’s style.css

    Thank you!

    #43835
    david.pagnon88
    Participant

    It working great, thanks !

    Now I have another question: I copy-pasted the entire function “interface_child_display_footer_sidebar” into my file “functions.php”, just to change a class among many others into this big function. The file is now beginning to be messy. Is there any way to do it without unhooking the whole function ?

    #43839

    Hi David,

    It don’t think unhooking the functions will work. Either make a direct change in the code and unhook the functions.

    You can unhook this action hook functions

    add_action( 'interface_footer_sidebar', 'interface_display_footer_sidebar', 10 );

    Otherwise you need to hire someone to figure it out.

    Thank you!

    #43853
    david.pagnon88
    Participant

    Hi,

    That’s actually what I did:I unhooked it this way

    function unhook_interface_display_footer_sidebar() {
    remove_action( 'interface_footer_sidebar', 'interface_display_footer_sidebar', 10);
    }
    add_action( 'init', 'unhook_interface_display_footer_sidebar');
    function interface_child_display_footer_sidebar(){
    BLABLA
    }

    The thing is that the function is rather big, and I only want to change one single class. Is there any other way to do it in fewer lines ? I’m just curious, if there is none I’d like to know it but this is no big deal, it’s still working fine !

    #43862

    Hi david.pagnon88,

    I don’t think there is other to do it. It there will be available any code to do it simply then we will let you know.

    Thank you!

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