Digital experiences for all disciplines
New Landing › How can we help? › Themeforest Theme Support › Dante › /dante/includes/… in Child Theme
New Landing › How can we help? › Themeforest Theme Support › Dante › /dante/includes/… in Child Theme
- This topic has 11 replies, 4 voices, and was last updated 9 years by David Martin – Support.
-
Posted in: Dante
-
July 25, 2015 at 12:07 am #197598
Hi.
After the last Update i do have some problems with the child theme.
I did some changes before among others in the /dante/page.php file in my child theme via /dante-child/page.php and it was fine. now the for me important part is outsourced in the file /dante/includes/sf-page-heading.php.
Added this to my child theme –> /dante-child/includes/sf-page-heading.php –> no changes in the frontend. but when i do edit the sourcefile in /dante/includes/sf-page-heading.php it works …
how can i solve the problem with the includes directory and the child-theme?
updates generally are fine, but changes like this are still unnecessary work for me as webmaster. now i do have to check all BASIC files (header.php, page.php etc) for eventual changes because the theme doesn’t work properly.
thanks in advance
July 25, 2015 at 12:32 am #197603Hi,
It’s better to place only the changed function/functions inside the functions.php instead duplicating the entire file.
Give it a try.-Rui
July 25, 2015 at 11:28 am #197644I’m not a programmer ๐ so, how can i replace the following part in the /includes/sf-page-heading.php in the functions.php?
### OLD
<?php } else { ?><h1 class=”entry-title” <?php echo $article_heading_text; ?>><?php echo $page_title; ?> TITEL</h1>
<?php } ?>
### NEW
<?php } else { ?><h1 class=”entry-title” <?php echo $article_heading_text; ?>><?php echo $page_title; ?> TITEL</h1>
<?php if ($page_subtitle) { ?>
<h3><?php echo $page_subtitle; ?></h3>
<?php } ?>
<?php } ?>Thanks a lot! ๐
July 25, 2015 at 2:19 pm #197666Hi,
Please locate the function name you are editing that code for. Then copy the whole function to your child themes
functions.php
and then change the code.– David.
July 25, 2015 at 7:28 pm #197712Again: I’m not a programmer ? …
I want to add the following code to /includes/sf-page-heading.php in row 185
<?php if ($page_subtitle) { ?>
<h3><?php echo $page_subtitle; ?></h3>
<?php } ?>sorry, but i do not understand “Please locate the function name you are editing that code for. Then copy the whole function to your child themes functions.php and then change the code.”
Thx
July 25, 2015 at 7:54 pm #197715So in that file is a function, which outputs the page heading. In order to override it in the child theme, you’ll basically want to copy the entire contents of that file to your child theme functions.php file. You can then make the change there, and it will sticky with updates.
– Ed
July 28, 2015 at 4:58 pm #198654it seems to work, but now there is another problem. when i do save a post, i get a blank page with the following error:
Warning: Cannot modify header information – headers already sent by (output started at /kunden/webseiten/homepage/wp-content/themes/dante-child/functions.php:28) in /kunden/webseiten/homepage/wp-admin/post.php on line 236
Warning: Cannot modify header information – headers already sent by (output started at /kunden/webseiten/homepage/wp-content/themes/dante-child/functions.php:28) in /kunden/webseiten/homepage/wp-includes/pluggable.php on line 1196
July 28, 2015 at 5:01 pm #198659Hi,
To help us assist you further could you zip your child theme up and add it here?
– We can inspect it better that way.
Thanks,
David.July 28, 2015 at 5:34 pm #198666This reply has been marked as private.July 28, 2015 at 6:32 pm #198686Hi,
That error usually means that you have an empty line. You should delete line 27 in your functions.php
Give it a try.-Rui
July 28, 2015 at 6:53 pm #198689that was easy … thanks a lot!
would never ever find the error by myself ๐
July 29, 2015 at 8:09 am #198803Thanks Rui! – Glad it’s resolved.
– David.
-
Posted in: Dante
You must be logged in and have valid license to reply to this topic.