How to enqueue Print CSS in Adamos child theme
-
Since the Adamos stylesheet is enqueued in the Adamos functions.php, I thought that was where I should add the reference to the print.css as well, but I’m having trouble getting it to work.
The relevant section from the parent functions file is
/** * Enqueue scripts and styles */ function adamos_scripts() { wp_enqueue_style( 'style', get_stylesheet_uri() ); if (!is_admin()) { wp_enqueue_script( 'small-menu', get_template_directory_uri() . '/js/small-menu.js', array( 'jquery' ), '20120206', true ); } if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) { wp_enqueue_script( 'comment-reply' ); } if ( is_singular() && wp_attachment_is_image() ) { wp_enqueue_script( 'keyboard-image-navigation', get_template_directory_uri() . '/js/keyboard-image-navigation.js', array( 'jquery' ), '20120202' ); } if (!is_admin()) { wp_enqueue_script( 'keyboard-image-navigation', get_template_directory_uri() . '/js/keyboard-image-navigation.js', array( 'jquery' ), '20120202' ); } } add_action( 'wp_enqueue_scripts', 'adamos_scripts' );
——-
I copied this entire section to the child functions file, at the same time addingwp_enqueue_style( 'print', get_print_uri() );' directly under
wp_enqueue_style( ‘style’, get_stylesheet_uri() );’But when I updated the child functions file, the file was blanked out (the white screen of death).
I’m not sure where I went wrong. Any help is welcome.
The print file is print.css and it exists only in the Adamos parent theme.
The site is TheEditorsBlog.net/members (it’s an incomplete site)Thank you for your help.
- The topic ‘How to enqueue Print CSS in Adamos child theme’ is closed to new replies.