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

    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’);

    #1136094

    Hey pddcoms,

    https://cl.ly/acb1a66514c7 Are you sure this css selector is correct?

    Best regards,
    Victoria

    #1136104

    I think – yes. even if removed it, nothing will change. Any ideas?

    • This reply was modified 5 years, 3 months ago by pddcoms.
    #1136679

    Hi pddcoms,

    Best regards,
    Victoria

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