Skip Navigation

[Resolved] isotope filtering works in 2015 theme but not in my genesis theme

This support ticket is created 8 years, 9 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.


This topic contains 1 reply, has 1 voice.

Last updated by Alan 8 years, 9 months ago.



I followed some advice given by Waqas in another thread to start using the isotope javascript to produce some nice filtering and sorting effects.

I got a basic test version working on this test site: hidden link

However, when I change the theme to one of my Genesis themes, the functionality stops working.
I have added this to the Genesis > theme settings > header section

<script src="<?php echo get_template_directory_uri() ?>/isotope.pkgd.min.js" type="text/javascript"></script>

(This is the same code as I added to the header.php file of the Twenty Fifteen theme, and it works there.
The js file exists in both theme folders.

I've also tried adding this to my functions.php file, with no effect.

function add_isotope_js() {
    wp_enqueue_script( "isotope-js", get_template_directory_uri() . '/isotope.pkgd.min.js');
add_action('wp_enqueue_scripts', 'add_isotope_js');

Grateful if you can possibly advise.

Many thanks



I discovered the solution after lots of digging around in various forums.
As is often the case, it's stupidly simple. I'll post it here in case it benefits anyone else.

The issue was that on Genesis, you're using a child theme, and so the code in functions.php needs to be amended to use get_stylesheet_directory_uri() instead of get_template_directory_uri()

function add_isotope_js() {
    wp_enqueue_script( "isotope-js", get_stylesheet_directory_uri() . '/isotope.pkgd.min.js');
add_action('wp_enqueue_scripts', 'add_isotope_js');

Always learning 🙂

This ticket is now closed. If you're a Toolset client and need related help, please open a new support ticket.