Problem with the child theme

Posted in: Newsmag
Post count: 4

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

Post count: 4

I have found the solution. But you should really say something more prominent in the documentation: don’t grab the original template file from /themes/Newsmag/ but from /plugins/td-composer/legacy/Newsmag/

Thanks,
Gunter

Post count: 35449

Hi,
We are glad that you managed to find the right solution!
We will try to see what we can do to make the documentation more efficient!
Thank you!

Post count: 11

Hi, I have the same problem but I don’t understand the solution. Someone can explain it to me, please?
thanks

Post count: 20688

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!

Post count: 11

Hi,thanks for response. I want to delete itemscope=”itemscope” itemtype=”https://schema.org/WebPage&#8221; from body label

Post count: 11

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

Post count: 20688

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!

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