Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1401762

    Hi,
    how can i replace the h3-Tag for the avia layout element “team member” with a p-tag in enfold?
    Best regards
    Chris

    #1401770

    Hey Chris_85,
    Try adding this code to the end of your child theme functions.php file in Appearance ▸ Editor:

    function custom_script() { ?>
      <script>
    (function($) {
      $(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('h3.team-member-name', '<p></p>');
      });
    }(jQuery)); 
    </script>
      <?php
    }
    add_action('wp_footer', 'custom_script');

    Then clear your browser cache and check.

    Best regards,
    Mike

    #1401801

    or use that filter: avf_customize_heading_settings in your child-theme functions.php
    a lot of enfold alb elements do have that filter implemented

    
    function customize_team_member_heading( array $args, $context, array $extra_args = array()){
      if( $context == 'avia_sc_team' ){
        $args['heading'] = 'p';   
      }
      return $args;
    }
    add_filter( 'avf_customize_heading_settings', 'customize_team_member_heading', 10, 3 );
    #1401823

    Hi,

    Thanks for helping out @guenni007 :-)

    Best regards,
    Rikard

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