Support » Plugin: Jetpack by WordPress.com » Jetpack Tiled Galleries not working after swap theme

  • Resolved brasofilo

    (@brasofilo)


    Just faced this problem and the solution as mentioned in other threads it to check if the theme is modifying the default gallery shortcode.

    Search for “post_gallery” in the parent theme, you’ll find something like bellow, take note of the callback name:

    add_filter( 'post_gallery', 'THE-PARENT-THEME-CALLBACK', 10, 2 );

    And use the following in your child theme functions.php file:

    add_action( 'after_setup_theme', 'b5f_block_parent_gallery' );
    
    function b5f_block_parent_gallery()
    {
    	remove_filter( 'post_gallery', 'THE-PARENT-THEME-CALLBACK', 10 );
    }

    Make sure the priority number, 10 matches.

    http://wordpress.org/plugins/jetpack/

Viewing 1 replies (of 1 total)
  • Another theme only worked with this other hook:

    add_action( 'template_redirect', 'b5f_block_parent_gallery' );

Viewing 1 replies (of 1 total)
  • The topic ‘Jetpack Tiled Galleries not working after swap theme’ is closed to new replies.