Hi guys. I use your code, but it doesn’t work. This is very strange, because on the other site the same code works fine.
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(‘.html_entry_id_205 .slideshow_caption h2’, ‘<h1></h1>’);
}(jQuery));
</script>
<?php
}
add_action(‘wp_footer’, ‘replace_tags_with_tags’);
Hey pddcoms,
https://cl.ly/acb1a66514c7 Are you sure this css selector is correct?
Best regards,
Victoria
I think – yes. even if removed it, nothing will change. Any ideas?
Hi pddcoms,
Best regards,
Victoria