WordPress.org

Ready to get started?Download WordPress

Forums

is_page_template() in child themes (1 post)

  1. Adrià López
    Member
    Posted 2 years ago #

    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!

Topic Closed

This topic has been closed to new replies.

About this Topic