WordPress.org

Plugin Reviews

OH Add Script to Individual Pages Header Footer

Simple plugin to add script to header and footer for individual pages & posts

9 reviews
Average Rating
4.9 out of 5 stars
A well written and super handy plugin
By , for WP 4.1.1

Fantastic add-on to use with an app-platform or more complex websites. Makes work much easier. Lovely! Thanks a lot!

I found it!
By , for WP 4.1.1

Thank you!
ps: fruitful theme

Warning Search Page
By ,

The code gives a notice in the search.php file as it has $ post-> ID, the solution is to add two lines:

function oh_add_script() {
    global $post;
    <strong>if (!isset($post)) return;</strong>
    $output = get_post_meta($post->ID,'_oh_add_script_header',true);
    echo stripslashes($output);
    $sogo_header_footer =  get_option('sogo_header_footer');
    if(isset($sogo_header_footer['oh_header'])){
        echo stripslashes($sogo_header_footer['oh_header']);
    }

}
function oh_add_script_footer() {
    global $post;
    <strong>if (!isset($post)) return;</strong>
    $output = get_post_meta($post->ID,'_oh_add_script_footer',true);
    echo stripslashes($output);
    $sogo_header_footer =  get_option('sogo_header_footer');
    if(isset($sogo_header_footer['oh_footer'])){
        echo stripslashes($sogo_header_footer['oh_footer']);
    }

}
Works great for me on my child theme
By , for WP 4.1

Worked well on a Genesis child theme, and as stated, it doesn't load the script on other pages or posts.

Thanks for making this available on the WordPress repository!

Saved the layout of my new site
By , for WP 3.9.1

I looked high and low for a plugin that would do as this one does. Not only is this one supported, but it was supported quickly - and they went beyond the call of duty to help me work this into my theme after a small bug in the theme's code prevented proper function.

Thank you guys.

Fantastic plugin! Very useful!
By ,

This should be default in wordpress nowadays!

Wonderful plugin, works with all themes, regular updates. What more can you ask!

Exactly what I needed - best way to insert javascript for just one page
By , for WP 3.9

I was looking to add some simple javascript code to the one page without having to edit the template files. This plugin solved my problem and is exactly what I needed. I can now switch between templates (including mobile templates) without having to to put the code in the header each time.

The only improvement I could suggest is a little more documentation. To use the plugin, enter the custom javascript code in a special field at the bottom of the post/page editing screen. You start with <script type="text/javascript"> enter the code, and then end it with </script>

Webdesigners #1 resources for ultimate control...
By , for WP 3.7

Been looking for plugin like this all over. Most of them haven't had updates for 2 years. And rest didn't work. This one is only one that works flawlessly. Very grateful for author of thinking it up. Can now have CSS per page. Excellent!

tnk
By Plugin Contributor, for WP 3.8

tnx

You must log in to submit a review. You can also log in or register using the form near the top of this page.