Title: Load a javascript only on blog page
Last modified: August 20, 2016

---

# Load a javascript only on blog page

 *  [sticks464](https://wordpress.org/support/users/sticks464/)
 * (@sticks464)
 * [14 years, 4 months ago](https://wordpress.org/support/topic/load-a-javascript-only-on-blog-page/)
 * I have created a blank page named blog and specified it to be the posts page 
   in the Reading > settings with a static home page. I am using tabs in the post
   page sidebar and want the javascript file to only load on those pages.
    This 
   is what I am using in the functions file to load the script:
 *     ```
       add_action('wp_print_scripts', 'enqueueMyScripts');
       function enqueueMyScripts(){
           if( is_page('Blog') ) {
                wp_enqueue_script('tabs', get_bloginfo('template_url').'/js/tabber-minimized.js', false, '1.0', true);
          }
       }
       ```
   
 * This does not work on the posts page but does work on any other page. I have 
   tried changing ‘Blog’ to ‘blog’, ‘Home’ and ‘home’.
    Nothing works. Is there 
   another way to get the script to load just for the posts pages?

The topic ‘Load a javascript only on blog page’ is closed to new replies.

## Tags

 * [javascript](https://wordpress.org/support/topic-tag/javascript/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [sticks464](https://wordpress.org/support/users/sticks464/)
 * Last activity: [14 years, 4 months ago](https://wordpress.org/support/topic/load-a-javascript-only-on-blog-page/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
