Using child theme, now custom CSS screen hangs

Posted in: Newspaper
Post count: 19

After activating a child theme (wp-content/themes/Newspaper-child), the Theme Panel > Custom Code > Custom CSS screen hangs upon saving. When I go back to using the parent theme, the issue resolves itself.

Is there a fix for this?

I am including the code for my child theme’s functions.php and style.css files.

Thanks, as always!

HANGING SCREEN – CUSTOM CSS:
https://ibb.co/YBFZRt5

FUNCTIONS.PHP

<?php
add_action( 'wp_enqueue_scripts', 'my_theme_enqueue_styles' );
function my_theme_enqueue_styles() {
$parent_style = 'Newspaper-style'; // This is 'twentyfifteen-style' for the Twenty Fifteen theme.
wp_enqueue_style( $parent_style, get_template_directory_uri() . '/style.css' );
wp_enqueue_style( 'child-style',
get_stylesheet_directory_uri() . '/style.css',
array( $parent_style ),
wp_get_theme()->get('Version')
);
}
?>

STYLE.CSS

/*
Theme Name: Newspaper Child
Theme URI: http://xyz.com/newspaper-child/
Description: Newspaper Child
Author: XYZ, Inc.
Author URI: http://xyz.com
Template: Newspaper
Version: 1.0.0
License: N/A
License URI: N/A
Tags: news
Text Domain: newspaper-child
*/

  • This topic was modified 7 years by bxp331.
  • This topic was modified 7 years by bxp331.
Post count: 19

UPDATE: All of the panels in the Theme Panel are hanging––not just the Custom CSS panel. The spinner spins ad infinitum.

Hope this helps diagnose the problem.

Post count: 35449

Hi,

Please make sure that the theme system status is configured as mentioned in the requirements guide. Please follow the guide carefully
https://forum.tagdiv.com/requirements-for-newspaper/
Please increase wp-memory and set this code in .htaccess -> https://www.screencast.com/t/WG313pTGP , also please check the php version too!

Please try the new child theme from the current package ( Newspaper v9.6 ), also try to set just parts of code in child theme and see if this is a problem with the code or not.

Thank you!

Post count: 19

Thanks! Can you point me to documentation to how to set up the child themes in Newspaper 9.6? I assume this is not the same as the standard WP method. I couldn’t find that documentation easily.

FYI, I’m running the child theme using the standard WP method––creating a new folder for the theme called Newspaper-child, then going through the steps outlined in my original post.

Thanks again.

Post count: 35449

Hi,

The method for the child is the same, but you need to copy in child the current theme files, and set there, in files the code ( above code ) from your old child.
Child theme support -> https://forum.tagdiv.com/the-child-theme-support-tutorial/

Also please make sure that you made the configuration for theme requirements like in our guide.

Thank you!

Viewing 5 posts - 1 through 5 (of 5 total)
The forum ‘Newspaper’ is closed to new topics and replies.