Viewing 16 posts - 1 through 16 (of 16 total)
  • Author
    Posts
  • #637088

    Hi, for SEO purposes I would like to remove the h3 tag from the widgettitle and make it a div instead. Can you help me make this update to my child theme?

    #637150

    Hey blizzmarketing!

    Please go to Enfold/framework/php/class-sidebar-generator.php file and find

    				'before_title'  => '<h3 class="widgettitle">', 
    				'after_title'   => '</h3>'

    and change them as needed.

    Cheers!
    Yigit

    #637594

    Hi Yigit, thanks for the quick response! I added this file to my child theme in the same directory structure as the parent theme and updated the h3 to a div. It didn’t change the existing widget title in the footer to a div from h3. I’m trying to change the title in yellow in the footer to something besides an h3.

    Thanks so much!

    #638034

    Hi,

    I’m afraid that won’t work that way, try moving the whole class avia_sidebar block to your child theme functions.php.

    Best regards,
    Josue

    #638190

    Hi Josue, thank you for your response! Could you clarify what you mean by your recent comment? I don’t have much of a programmer brain, more of a designer brain. If you could help me out, that would be great!

    Thanks!

    #638321

    Hey!

    I checked the reply of Josue and I do not see anywhere the ” recent comment “. Please check again, he might have edited for you :_)

    Regards,
    Basilis

    #638812

    Hi, sorry I should have been a bit more clear. I was looking for clarification on this comment – “try moving the whole class avia_sidebar block to your child theme functions.php.” I am not sure how to implement this.

    You all are amazing at responding so fast and it is greatly appreciated!

    #638917

    Hi,

    1. Paste this at the end of your child theme functions.php.
    2. Modify the widget structure as needed.

    Best regards,
    Josue

    #640998

    Hi Josue, I added the code to my child functions.php file and it didn’t seem to change anything. I’m trying to change the H3 that is in the current title in the widget area in yellow. Let me know if I missed anything. The code is still in the functions.php child directory.

    Thanks!

    #641795

    Hi,

    Is that a custom widget area? The “avia_sidebar” modification will not work if it is a default widget area. Replace it with a custom widget area then add this in the functions.php file:

    add_filter('avia_custom_widget_args', 'avia_custom_widget_args_mod', 10, 1);
    function avia_custom_widget_args_mod($args) {
    	$args['before_title'] = '<div class="widgettitle">';
    	$args['after_title']  = '</div>';
    	return $args;
    }

    You don’t need to copy the whole “avia_sidebar” class.

    Best regards,
    Ismael

    #642173

    Thank you Ismael! That removed the H3s from the widget title in the custom sidebars. Last question, is it possible to replace the default footer widget with a custom widget?

    Thank you so much! We love using your theme and recommend it to all of our clients. :)

    #642257

    Hi!

    Can you please elaborate on the changes you would like to make? :)

    Cheers!
    Yigit

    #926611

    Hi Ismael

    Could “we” (you) adjust your code

    add_filter('avia_custom_widget_args', 'avia_custom_widget_args_mod', 10, 1);
    function avia_custom_widget_args_mod($args) {
    	$args['before_title'] = '<div class="widgettitle">';
    	$args['after_title']  = '</div>';
    	return $args;
    }

    to cange H3 into da div for default widget area, or should I change it in the Enfold/framework/php/class-sidebar-generator.php?

    For Example?

    'before_title'  => '<h3 class="widgettitle">', 
    				'after_title'   => '</h3>'

    to

    'before_title'  => '<div class="widgettitle">', 
    				'after_title'   => '</div>'

    A lot of thanks to you.
    Alex

    • This reply was modified 6 years, 9 months ago by alex_0111.
    #927669

    Hi,

    I would instead suggest to do it like

    
    add_filter('avia_custom_widget_args', 'avia_custom_widget_args_mod', 10, 1);
    function avia_custom_widget_args_mod($args) {
    	$args['before_title'] = '<div class="widgettitle"><h3>';
    	$args['after_title']  = '</h3></div>';
    	return $args;
    }

    Let me know if it works better.

    Best regards,
    Basilis

    #928522

    It doesn´t work. May the Problem is, i use a “default widget area” an no custom widget area.
    I would like to change the <h3> Tag into a <div> Tag in the footer (default wieget area?)

    I tryed your code, also I tryed to change the code into the Enfold/framework/php/class-sidebar-generator.php
    Both dosn´t work. Is ther an other PHP File to change?

    Thanks
    Alex

    #929402

    Hi,

    Please refer to this link https://kriesi.at/support/topic/change-template-code-in-child-theme/#post-600637

    You can change the HTML structure as required in the code :)

    Let us know if you have any issue.

    Best regards,
    Vinay

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