Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I used this tutorial in creating portfolio page: http://wp.tutsplus.com/tutorials/creating-a-filterable-portfolio-with-wordpress-and-jquery/

I am working on Thematic child theme: http://www.integritycorp.org/study/?page_id=103#all

This is the code I used:

Why doesn’t the filtering work when I click on one of the tags?

share|improve this question
    
filterable.js is 404 not found. Use your browser's error console. –  Milo Jun 30 '12 at 19:10
    
it is now exist but still not working –  Rasha Nour Eldin Jun 30 '12 at 19:58
    
ok its working only if i added filterable.js to the parent theme –  Rasha Nour Eldin Jun 30 '12 at 20:07
    
see my answer below. –  Milo Jun 30 '12 at 20:15

1 Answer 1

When enqueueing scripts in a child theme directory, use get_stylesheet_directory_uri() instead of get_template_directory_uri(). In the case of a child theme, get_template_directory_uri() will return the parent theme's directory.

function enqueue_filterable(){
    wp_register_script(
        'filterable',
        get_stylesheet_directory_uri() . '/js/filterable.js',
        array( 'jquery' )
    );
    wp_enqueue_script( 'filterable' );
}
add_action( 'wp_enqueue_scripts', 'enqueue_filterable' );
share|improve this answer
    
now i use quick sand but i wonder why not working integritycorp.org/study/?page_id=34 –  Rasha Nour Eldin Jul 2 '12 at 10:54

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.