- This topic has 5 replies, 2 voices, and was last updated 8 years, 8 months ago by Theme Horse Support Team.
-
AuthorPosts
-
March 26, 2016 at 7:26 am #43778david.pagnon88Participant
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>’
) );March 28, 2016 at 10:17 am #43813Theme Horse Support TeamKeymasterHi 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.cssThank you!
March 29, 2016 at 1:25 am #43835david.pagnon88ParticipantIt 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 ?
March 29, 2016 at 6:57 am #43839Theme Horse Support TeamKeymasterHi 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!
March 29, 2016 at 8:50 pm #43853david.pagnon88ParticipantHi,
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 !
March 30, 2016 at 7:19 am #43862Theme Horse Support TeamKeymasterHi 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!
-
AuthorPosts
- You must be logged in to reply to this topic.