WordPress.org

Support

Support » How-To and Troubleshooting » is_page_template() in child themes

is_page_template() in child themes

  • Hi,
    I’m working with child themes but I have a problem:

    I don’t know why is_page_template() always returns false in this:

    if ( is_page_template('page-gallery.php') )	{
    
        wp_enqueue_style('FullPageGallery', get_stylesheet_directory_uri() . "/scripts/FullPageGallery/css/style.css", false, '1.0', 'screen');
    
    }

    This code is in functions.php of my child theme but always returns false and don’t add the style to the head.

    Where I have to put the “page-gallery.php” to work? in the child folder or the parent theme folder?

    Thanks!

  • The topic ‘is_page_template() in child themes’ is closed to new replies.