-
Author
-
November 9, 2015 at 13:40 #86351akalParticipant
Hi,
I would like to edit the file /wp-content/themes/kleo/kleo-framework/lib/class-multiple-sidebars.php
(change L66-67 the ‘h5’ for a ‘span’)
so I created a copy of this file in my child theme /wp-content/themes/kleo-cild/kleo-framework/lib/class-multiple-sidebars.php
but this copy is ignored, only the changes made on the original are considered…
does that mean the kleo-framework files cannot be used in a child theme ?
November 9, 2015 at 14:07 #86361sharmstrModeratorThat’s correct. Based on your changes, I’m assuming you wanted to change the look of the title. You can override it using css in such a way that it wont effect all h5 tags on the site.
COPY CODE.sidebar h5 { font-size: 17px; line-height: 27px; font-weight: 900; margin: 10px 0; display: block; border-top: solid 1px #fff; border-bottom: solid 1px #fff; text-align: center; }
.
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionThis support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com
November 9, 2015 at 15:03 #86368akalParticipantHi @sharmstr
No I would like to change the Hx structure for a span or div. This H5 is not a logical structure for my SEO strategy…
So, no way to use kleo-framework files in my child theme ?
Akal
November 9, 2015 at 15:30 #86371sharmstrModerator@abe – Is it possible to override the sidebar_generator class with a remove action, then and add_action for a custom init?
COPY CODEadd_action('init',array('sidebar_generator','init'));
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionThis support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com
November 9, 2015 at 23:30 #86487AbeKeymasterHi, I have modified the file with the sidebar generator class so you can copy the whole class to your child theme if you like and it will load yours.
You will need to edit this file and replace it’s content with the one in the attached file
wp-content/themes/kleo/kleo-framework/lib/class-multiple-sidebars.phpThis change will be reflected in the next update so no need to worry when updating.
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution---
@ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.Attachments:
You must be logged in to view attached files.November 9, 2015 at 23:31 #86489AbeKeymasterSo in your child theme/functions.php you will have to copy the whole code from line 30 that looks like:
‘class sidebar_generator’ until line 475 when the class definition ends.Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution---
@ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.November 10, 2015 at 12:56 #86567akalParticipantThank @sharmstr, thank @aben
I replaced “class-multiple-sidebars.php” by the new one in /themes/kleo/kleo-framework/lib/
it’s ok but when I copy from line 30class sidebar_generator
until line 475 to my child theme function, I’ve blank screen.
So I excluded line 475 that is supposed to end the line 29 if(! class_exists('sidebar_generator')) {
and took line 474, but that gives me front-end issues… same if I take from line 29 until line 475…Anyway, is there any other way to edit those 2 lines (70&71)
'before_title' => '<h5>', 'after_title' => '</h5>',
by'before_title' => '<span>', 'after_title' => '</span>',
without burdening function.php with the whole class-multiple-sidebars.php content ?Akal
November 10, 2015 at 14:13 #86580AbeKeymasterHi, I have modified the file to replace the content and now you can use in your child theme something like this:
COPY CODEadd_filter( 'sq_ms_before_title', 'my_before_title_widget'); add_filter( 'sq_ms_after_title', 'my_after_title_widget'); function my_before_title_widget() { return '<h5>'; } function my_after_title_widget() { return '</h5>'; }
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution---
@ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.Attachments:
You must be logged in to view attached files.November 10, 2015 at 15:30 #86607AbeKeymasterGlad to hear. That.
Cheers
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution---
@ SeventhQueen we do our best to have super happy customers. Thanks for being our customer. -
AuthorPosts
The forum ‘General questions’ is closed to new topics and replies.