Viewing 7 replies - 1 through 7 (of 7 total)
  • This plugin is the best one I’ve found so far a I love it! But you are right, it would be awesome to be able to include or exclude certain pages and / or control individual pages. I don’t think it has this feature at the moment but would love it know if it’s in the roadmap! ??

    this plugin is a joke if you can’t do that. I am trying to find a plugin to put javascript code on one particular thank you page and i can’t find anywhere on the internet on how to do that. this is absurd

    @thereznation I don’t know if you’ll have better luck than me, but there’s this option

    /* Describe what the code snippet does so you can remember later on */
    add_action('wp_head', 'your_function_name');
    function your_function_name(){
    if(is_single(73790)) {  ?>
    PASTE HEADER CODE HERE
    <?php  }
    };

    from here: https://kinsta.com/knowledgebase/add-code-wordpress-header-footer/

    Plugin Author Stefano Lissa

    (@satollo)

    A simple code can be added directly in header and footer (php is allowed)
    <?php if(is_single(73790)) { ?>
    PASTE HEADER CODE HERE
    <?php } ?>

    Is there a way (and I don’t mind a workaround) to inject HTML into the body (not the header or footer) of a specific page, too? I would like to add CSS classes to one particular page only. Integrating this feature would certainly add to the value of the plugin. Many thanks

    • This reply was modified 4 years, 7 months ago by jfbprivate.
    Plugin Author Stefano Lissa

    (@satollo)

    The code above explain how to do that. Anyway, having a single page where you need to add code, why not add it to that specific page directly?

    WP classic editor and gutenberg both supports the JS code.

    Stefano.

    Yeah I’ve had issues with those for some reasons which is why I came here. Anyway I’ve figured it out in the meantime. Thanks

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Individual code per page’ is closed to new replies.