I tried to modify the template header.php in the child theme, but Newsmag always takes the file from the parent theme.
After I deleted
do_action( 'tdc_header' );
if ( has_action( 'tdc_header' ) ) {
return;
}
from header.php, the changes in header.php took effect, but the complete styling in the area
<div class="td-header-container td-header-wrap td-header-style-1">
was lost.
How can I do such modifications in Newsmag child theme?
Best regards,
Günter
Hi,
If you want to modify the header.php file in a child theme, please copy it from the composer plugin -> https://prnt.sc/hBWjtJD1VB5v and paste it in the child theme main folder.
But if I may ask, what modifications would you like to make to it? Maybe there are other ways.
Let me know.
Thank you!
Hi,thanks for response. I want to delete itemscope=”itemscope” itemtype=”https://schema.org/WebPage” from body label
Hi, I copied the file you said, but now all the changes that I made in the child theme for the header style that I chose in the theme panel doesn’t aply. In my case I chose header-style-6 and I modified this file in the child-theme but now I see in the html the class td-header-style-1 and not 6. I can modify this class in header.php but It doesn’t use the header-style-6 file.
Any solution for this?
Thanks
I thought that you only wanted to modify the main header.php file to remove the webpage schema. Removing this code https://prnt.sc/CCod3eD5L3Dg should not create any problems. I tested it as well.
But if you also want to modify the header template you are using, header template 6, in the child theme, then there are more steps.
You will need to create folders in the child theme, to create this path Newsmag-child\parts\header
In the header folder, copy these files from the same folder in the composer https://prnt.sc/Kk4W5YDy9dCc in the child theme https://prnt.sc/nd7KfivQ63O2 Then you can modify the header template or the other files.
I can help more if you could mention more details about what you would like to modify in the header template. Let me know.
Thank you!