I'm building a child theme of Newspaper 7, and I'm trying to call a specific stylesheet for certain pages, however is_page() isn't working for me. What should I change in my code to be able to do what I'm trying to do?
Here is my code:
<?php
add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles', 1001);
function theme_enqueue_styles() {
wp_enqueue_style('td-theme', get_template_directory_uri() . '/style.css', '', TD_THEME_VERSION . 'c' , 'all' );
wp_enqueue_style('td-theme-child', get_stylesheet_directory_uri() . '/style.css', array('td-theme'), TD_THEME_VERSION . 'c', 'all' );
if( is_page( array( 'about-me', 'contact', 'social-media'))) {
wp_enqueue_style( 'td-theme-child', get_stylesheet_directory_uri().'/style2.css'. 'c', 'all' );
}
}
is_page()
conditional to something unique. Also'/style2.css'. 'c',
looks like a typo to me...