I have a fatal [Sat Jan 27 15:19:39.279740 2018] [:error] [pid 25500] [client 104.196.118.37:57392] PHP Fatal error: Cannot redeclare _check_isactive_widgets() (previously declared in /nas/content/live/feline13/wp-content/themes/Newspaper-child/functions.php:30) in /nas/content/live/feline13/wp-content/themes/Newspaper/functions.php on line 208, referer: http://purrview.com/wp-cron.php?doing_wp_cron=1517066378.8447420597076416015625
I asked WpEngine to try and resolve but they said it was in the child theme folder. I also tried uploading child theme via ftp and via theme upload.
It basically makes my site disappear and gives me a 500 error, Any advice I would really like to use your theme and I need a child theme so I don’t lose all my customizations when you update the core theme.
.
ps one thread said to update the main theme and then use the child theme, isn’t that backwards? don’t you mean update and customize the child theme so we don’t loose our customizations when you update the core theme?
Thanks, Tonia
Upon further review…the above error is completely unrelated.
I’ve tried to edit the includes/wp_booster/td_wp_booster_functions.php file in both the WP editor and via SFPT for both my child and parent. Both have the line in the instructions you supplied commented out, but the og:image line still shows on my site. I also found that no changes I make to that file actually get rendered on my site. I have worked with a ton of people on my end to ensure this isn’t a cache issue, so the only thing left is an issue with the theme.
I’m getting two errors related to the td_wp_booster_functions.php
PHP Fatal error: Uncaught Error: Call to undefined function do_action() in /nas/content/live/rtchronicles/wp-content/themes/Newspaper-Child/includes/wp_booster/td_wp_booster_functions.php:8\nStack trace:\n#0 {main}\n thrown in /nas/content/live/rtchronicles/wp-content/themes/Newspaper-Child/includes/wp_booster/td_wp_booster_functions.php on line 8
Line 8 is: do_action(‘td_wp_booster_before’); //@todo is probably not used by anyone
Hi,
Woocommerce will import a default shop page initially, this will show products on the page like this
– https://www.screencast.com/t/8AfWgJnt
– https://docs.woocommerce.com/document/woocommerce-pages/
The number of products per page can be controlled like this
– https://docs.woocommerce.com/document/change-number-of-products-displayed-per-page/
That code in the child theme or main theme functions.php file will allow you to change the number of products on a default shop page.
Or you can display products on pages using the shortcodes provided by woocommerce
– https://docs.woocommerce.com/document/woocommerce-shortcodes/
These shortcodes can be entered on pages using a text element, with the tagDiv composer
– https://www.screencast.com/t/6YDbXpsd
– https://www.screencast.com/t/3t4Vz2t8
This way you could display for example products and other elements on the same page. This is how the theme woocommerce demo is made, with shortcodes
– https://demo.tagdiv.com/newspaper_tech/shop/
This the actual page content of the demo page, maybe you can look it over
– https://pastebin.com/2RCe4N7C
Thanks
Hi,
You could modify the number of products for the shop page here, in the main theme
– https://www.screencast.com/t/7e8feQoitOS9
Or if you have a child theme in the child theme functions.php, a code like this will work
– https://docs.woocommerce.com/document/change-number-of-products-displayed-per-page/
Thanks
https://forum.tagdiv.com/the-child-theme-support-tutorial/
A sample child theme (with style.css and functions.php files) is available in the /code/ folder in the package that you downloaded form Themeforest:

We are having an issue similar to this one:
https://forum.tagdiv.com/topic/theme-colors-not-loading-menu-items-error/
When we load the core theme, everything works fine.
When we load the theme via child, we get no background colors (the fancy blue colors) in the theme panel. Also, all of the sub-items on the right side (that you see when you click the main items like HEADER and FOOTER and ADS on the left sidebar) simply display the square loading gif without actually opening the panel.
The theme .zip was freshly downloaded from Themeforest last night. The theme version is listed as 8.5.1 but the child theme’s style.css has the version listed as 7.7c. Is this breaking the loading of the child theme in any way? I see the enqueueing in the child’s functions.php:
wp_enqueue_style(‘td-theme-child’, get_stylesheet_directory_uri() . ‘/style.css’, array(‘td-theme’), TD_THEME_VERSION . ‘c’, ‘all’ );
Do the style versions need to match?
Resolved – issues in functions.php in child-theme.
Child themes don’t work this way and with good reason. Especially for the fact in how child themes work, you would essentially be loading the same theme twice which would make loading your site extremely slow. Let me explain what I’m talking about.
With a child theme, you still need to have the parent theme (Newspaper) installed on your website… just not activated. The child theme needs to be the active theme. With the child theme active, WordPress knows that Newspaper is the parent theme and to load it first when the visitor loads your site. The child theme loads second the altered theme files after the parent theme loads.
Many users only use functions.php and style.css files in their child theme to make changes to their site. If there are other changes needed for your site that can’t be accomplished using these two files, then you need to find the file in the parent theme that needs editing, COPY it to your child theme folder (put it in the same location where it is in the parent theme… create folders if you have to), make the necessary changes to the file using your favorite code editor, and then upload it to your site using FTP.
When Newspaper updates, you will want to use a program like Diffmerge to show you the differences between the updated parent theme files and the current version of your child theme files. That way if there’s anything profoundly different, you can update your child theme files accordingly to prevent breaking something on your site.
TagDiv has resources on how to use a child theme and has a starter child theme you can download, make changes, and upload to your site. Check them out.
Yes, but I need to reference the removal in the child theme’s functions.php.
Can you provide me that code?
Thanks
Keith
The CSS works as expected.
I spoke with WooCommerce’s support earlier this morning, and they mentioned that the product loop that gets added by default to the store’s front page is defined by the product-archive.php file in TagDiv’s file hierarchy.
I need to know what code to place in the child theme’s functions.php file so that the product loop does not appear at all on the shop’s main page.
I followed those instructions, and then realized that the lightbox checkbox I needed to activate wasn’t available in WooCommerce Product Display settings.
So I added the following snippet of code to the Child Theme’s function.php file:
add_action( 'after_setup_theme', 'yourtheme_setup' );
function yourtheme_setup() {
add_theme_support( 'wc-product-gallery-zoom' );
add_theme_support( 'wc-product-gallery-lightbox' );
add_theme_support( 'wc-product-gallery-slider' );
}
I adjusted the ‘yourtheme’ to ‘newspaper’. Please let me know what this needs to be if that’s not accurate.
It broke the site. I’m now getting the following error:
Parse error: syntax error, unexpected ‘3’ (T_LNUMBER) in /home/robywebd/public_html/cet/wp-content/themes/Newspaper-child/functions.php on line 31
The answer was given here: https://forum.tagdiv.com/topic/how-to-create-a-child-theme-for-newspaper-theme/
Read carefully this manual: https://forum.tagdiv.com/the-child-theme-support-tutorial/
A sample child theme (with style.css and functions.php files) is available in the /code/ folder in the package that you downloaded form Themeforest:

Please send the codes for style.css and functions.php
PLEASE post down the file codes for style.css and functions.php!
I truly need help to set the child theme.
any help please? I can’t login unless I remove the functions.php of my child theme
error is always the same
Warning: Cannot modify header information – headers already sent by (output started at /home/greenpl1/public_html/wp-content/themes/Newsmag-child/functions.php:1) in /home/greenpl1/public_html/wp-login.php on line 396
Warning: Cannot modify header information – headers already sent by (output started at /home/greenpl1/public_html/wp-content/themes/Newsmag-child/functions.php:1) in /home/greenpl1/public_html/wp-login.php on line 409
Magazine Green Planner
Hi
I’m getting this error trying logging in
Warning: Cannot modify header information – headers already sent by (output started at /home/greenpl1/public_html/wp-content/themes/Newsmag-child/functions.php:1) in /home/greenpl1/public_html/wp-login.php on line 396
the line is the one inserted in your child theme template
here what I get when I try to log in: https://imgur.com/a/KmWSS
I have found the culprit and it was entirely my fault – I failed to update the child theme code along with the main theme. Sorry for bothering you.
So to anyone reading this with similar problems, make sure that you have updated the child theme code, particularly functions.php.
Hello,
After updating, we are receiving this terrible message:
Warning: include(): Unable to access /usr/home/marronyblanco.com/web/wp-content/themes/Newspaper/includes/td_wordpres_booster.php in /usr/home/marronyblanco.com/web/wp-content/themes/Newspaper-child/functions.php on line 9 Warning: include(/usr/home/marronyblanco.com/web/wp-content/themes/Newspaper/includes/td_wordpres_booster.php): failed to open stream: No such file or directory in /usr/home/marronyblanco.com/web/wp-content/themes/Newspaper-child/functions.php on line 9 Warning: include(): Unable to access /usr/home/marronyblanco.com/web/wp-content/themes/Newspaper/includes/td_wordpres_booster.php in /usr/home/marronyblanco.com/web/wp-content/themes/Newspaper-child/functions.php on line 9 Warning: include(/usr/home/marronyblanco.com/web/wp-content/themes/Newspaper/includes/td_wordpres_booster.php): failed to open stream: No such file or directory in /usr/home/marronyblanco.com/web/wp-content/themes/Newspaper-child/functions.php on line 9 Warning: include(): Failed opening ‘/usr/home/marronyblanco.com/web/wp-content/themes/Newspaper/includes/td_wordpres_booster.php’ for inclusion (include_path=’.:/usr/home/sys/phpfarm/inst/php-5.3.29/pear/php/’) in /usr/home/marronyblanco.com/web/wp-content/themes/Newspaper-child/functions.php on line 9
And of course, our website has broken down and we have lost all the old design.
How can we solve it?
Thank you for clearing my doubts. One last thing:
How to deal with styles.css and functions.php that are under ‘mobile’ folder and created specifically when the website is viewed on mobile devices. Should I simply copy functions.php and style.css after creating a new directory ‘mobile’ under child theme?
Above I am talking about the mobile related folder of main theme, not about td mobile theme which we need to install as a plugin.
Thanks.
When installing and activating the Newsmag-child, some of the blocks/modules get messed up. The whole sidebar is empty and the widgets in footer 1, footer 2 and footer 3 are now all vertically of each other in footer 1. I’ve checked the contents of the custom functions.php, but can’t find the source in there. I have the feeling that a certain hook to the Newsmag API is missing for said modules.
In case it’s relevant, the sidebar contains 4x block 15. The footer uses Newsmag style 2, with Footer 2 being a Block 7 and Footer 3 being a custom menu.
Thanks in advance for the help!
Thank you Simion for the great details.
I also read the Bogdan’s reply here- https://forum.tagdiv.com/topic/setting-up-child-theme/ . A few doubt I have:
1. I understood that the child theme can also not be future proof, if any of the files that I added in child-theme get modified in original theme as well.
But what about Styles.css and functions.php? How does child theme load style.css? Does it use stylesheets code from original theme and child theme both? If so, then how?
What if there are two codes written for customization of same elements on both original theme CSS and child theme CSS. Which will be finally displayed on the live website?
Does child theme makes calls from style.css and functions.php from both original theme and child theme to display it on live website?
Does this affect the speed of site as well?
There are manily few core font name, size and color changes done by me on the original style.css of my theme. How can I keep it secure and stable even when I make an update of the theme?
functions.php is usually remain unchanged with theme updates but for better update-proof ness, should I add the custom code to the child theme functions.php and remove it from main functions.php?
What will happen if I add these codes at both the functions.php ( theme and child theme), will it cause any conflict in any possible way?
Kindly help
Hi Team,
With every new theme update, I always have to make a few changes in the theme’s core file and now I am fade up with this.
There are two main files that I have to customize in the core theme file. 1. Style.css 2. Functions.php
( I am not talking about custom CSS but the real style.css file under theme)
Is there a way by which I can keep these changes in functions.php and style.css stable/fixed using child theme even after updating theme?
Should I simply copy the code that I change in core style.css file and paste it in style.css of child theme? Will this work? or will it load the style.css two times?
There is some tutorial here – https://codex.wordpress.org/Child_Themes which ensure that the child theme stylesheet loads after original style.css.
<?php
function my_theme_enqueue_styles() {
$parent_style = 'parent-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')
);
}
add_action( 'wp_enqueue_scripts', 'my_theme_enqueue_styles' );
?>
Is this code already written under our sample child theme file?
What about functions.php? there are multiple codes that I have added at the end of theme’s core functions.php. Should I delete these codes from core functions.php and write it on the child theme functions.php? If so? where do I need to write these codes?
Currently, this is how child theme funcitons.php look:
<?php
/* ----------------------------------------------------------------------------
Newspaper V6.3+ Child theme - Please do not use this child theme with older versions of Newspaper Theme
What can be overwritten via the child theme:
- everything from /parts folder
- all the loops (loop.php loop-single-1.php) etc
- please read the child theme documentation: https://forum.tagdiv.com/the-child-theme-support-tutorial/
- the rest of the theme has to be modified via the theme api:
https://forum.tagdiv.com/the-theme-api/
*/
/* ----------------------------------------------------------------------------
add the parent style + style.css from this folder
*/
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, 'all' );
wp_enqueue_style('td-theme-child', get_stylesheet_directory_uri() . '/style.css', array('td-theme'), TD_THEME_VERSION . 'c', 'all' );
}
Where am I supposed to insert new functions.php code?
Please help me create an almost stable style.css and functions.php under child theme so that all theme upgrade doesn’t affect all frequent updates.
Thank you.
Hello,
I wanna do a change to the file Newspaper\includes\wp_booster\wp-admin\content-metaboxes\td_templates_settings.php, but in order to avoid losing the changes with the future updates I would like to use my child theme (already using it for functions.php).
Is it enough to copy the file in Newspaper-child\includes\wp_booster\wp-admin\content-metaboxes\td_templates_settings.ph and do all my changes here? Will it load?
Hello,
First please test your code in the main functions.php file and see if the code work properly. If it does, then please read this guide:
https://code.tutsplus.com/tutorials/a-guide-to-overriding-parent-theme-functions-in-your-child-theme–cms-22623
Thank you!