• Hello. As you know, we can add any javascript code we want to any page with hooks. Like this:

    function javascript_function() {
    if (is_single ('XXXX')) {
    ?>
    <script>
    // insert your JavaScript code here
    </script>
    <?php
    }
    }
    add_action('wp_footer', 'javascript_function');

    Source

    So how can we remove any javascript code from only XXXX post…? I searched but still couldn’t find a solution. Many old snippets don’t work.

    I would be glad if you could help.

    • This topic was modified 3 months, 2 weeks ago by mehmetg.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.