Tagged: child theme, template
-
AuthorPosts
-
March 11, 2016 at 7:00 pm #596990
Hi Enfold support team,
I’m trying to change the wrapping tag of widgets title in Enfold footer from <h3> to <p>.
It is ok when i do this in parent theme with includes/admin/register-widget-area.php
But it doesn’t work inside child theme when i create an includes/admin/register-area.php file.
Any idea ?
Thanks
March 12, 2016 at 6:01 pm #597233Hi ouranos3!
Thanks for reaching out to us on the support forum.
Could you please provide the link to your site and login information, so that we can have a closer look. You can place the login details in the Private Content section of your reply.
Best regards,
JordanMarch 14, 2016 at 5:26 pm #597877What do you need exactly ? FTP access or WordPress admin access (It’s multisite, can’t edit theme php files) ?
March 16, 2016 at 4:53 am #598754Hi,
Not sure why you would need to do that, are you looking to style the headers differently? We can help you out with that but we need to see the site in question. The file you mentioned won’t be overwritten in a child theme.
Best regards,
RikardMarch 16, 2016 at 11:52 am #598880Thanks Rikard.
It’s not related to a specific site. For example, on the official enfold home page main demo, in the footer, we can see in html source : <h3 class=”widgettitle”>INTERESTING LINKS</h3>
It’s about the <h3> “widget title” tag (in the footer but it could be anywhere else). The purpose is to apply some SEO recommandations for a site and to replace <h3> in Enfold footer by <p> tags.
I know it’s working when i change the tag in the parent theme, in register-widget.php.
So, i think i’ve got my answer about the child theme, no way to do that without changing some parent file, ok ?
Or is there a way with functions.php ? A function similar to the one we can use to wrap the logo with <H1> ?
Thanks for your kind help.
March 19, 2016 at 9:24 am #600637Hi!
You have to unregister the existing widget areas then register it back. Example:
function ava_remove_some_widgets(){ unregister_sidebar( 'av_everywhere' ); register_sidebar(array( 'name' => 'Displayed Everywhere', 'before_widget' => '<section id="%1$s" class="widget clearfix %2$s">', 'after_widget' => '<span class="seperator extralight-border"></span></section>', 'before_title' => '<h2 class="widgettitle">', 'after_title' => '</h2>', 'id'=>'av_everywhere' )); } add_action( 'widgets_init', 'ava_remove_some_widgets', 11 );
This code in the functions.php file will unregister the “Displayed Everywhere” widget area and then register it back with the “h2” as widget title.
Regards,
IsmaelMarch 19, 2016 at 1:27 pm #600679Thanks Ismael ! Very useful …
Good day.March 21, 2016 at 7:00 am #601060March 2, 2017 at 2:22 pm #754353Hi,
I would like to change the widget titles in my footer from <H3> to <H4>.
I have tried using the code you provided for “ouranos3” but it was not working.
Do you have an idea on how I could do this?
Thanks for your help!
- This reply was modified 7 years, 8 months ago by pberquet.
March 4, 2017 at 5:49 am #755473Hi @pberquet,
What problems are you getting when you try the code Ismael posted?
Best regards,
RikardMarch 6, 2017 at 12:32 pm #756330Hi Rikard,
It’s not a problem, it is just that the widget titles are still in “H3″… I would like them to be in “H4”
Regards,
Pberquet.
March 7, 2017 at 8:09 am #756823 -
AuthorPosts
- You must be logged in to reply to this topic.