Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1198048

    Hello. How can I change the Heading tags (h3) in the Footer widget areas?

    #1198119

    Hey Nazarii,

    Change to what or how(font-size, color, etc)?

    Could you please give us a link to your website, we need more context to be able to help you.

    Best regards,
    Victoria

    #1198145

    Just change h3 tags to h5

    #1198605

    Hi Petreshak,

    Could you please give us a link to your website, we need more context to be able to help you.

    Best regards,
    Victoria

    #1198679

    try this in child-theme functions.php:

    function replace_tags_with_tags(){
    ?>
    <script>
      (function($) {       
          function replaceElementTag(targetSelector, newTagString) {
            $(targetSelector).each(function(){
              var newElem = $(newTagString, {html: $(this).html()});
              $.each(this.attributes, function() {
                newElem.attr(this.name, this.value);
              });
              $(this).replaceWith(newElem);
            });
          }
          replaceElementTag('#footer h3.widgettitle', '<h5></h5>'); 
      }(jQuery)); 
    </script>
    <?php
    }
    add_action('wp_footer', 'replace_tags_with_tags');
    #1198686

    i thought we could use a filter – but it is only set in class-sidebar-generator.php for sidebar widget titles

    try this instead in your child-theme functions.php – it is better to replace it before it is inserted in the DOM

    function register_custom_footer_widget(){   
        $footer_columns = avia_get_option( 'footer_columns', '5' );
        for ($i = 1; $i <= $footer_columns; $i++){
    		unregister_sidebar( 'av_footer_'.$i );
    
    		register_sidebar(array(
    			'name' => 'Footer - column'.$i,
    			'before_widget' => '<section id="%1$s" class="widget clearfix %2$s">', 
    			'after_widget' => '<span class="seperator extralight-border"></span></section>', 
    			'before_title' => '<h5 class="widgettitle">', 
    			'after_title' => '</h5>', 
    			'id'=>'av_footer_'.$i
    		));
    	}	
    }
    add_action( 'widgets_init', 'register_custom_footer_widget', 11 );
    • This reply was modified 4 years, 6 months ago by Guenni007.
    #1199075
    #1199138
Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.