Hi,
how can i replace the h3-Tag for the avia layout element “team member” with a p-tag in enfold?
Best regards
Chris
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
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 );