New Landing How can we help? Themeforest Theme Support Dante /dante/includes/… in Child Theme

Viewing 12 posts - 1 through 12 (of 12 total)
  • Posted in: Dante
  • #197598
    Pikay
    Member
    Post count: 48

    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

    #197603
    Rui Guerreiro – SUPPORT
    Keymaster
    Post count: 25779

    Hi,

    It’s better to place only the changed function/functions inside the functions.php instead duplicating the entire file.
    Give it a try.

    -Rui

    #197644
    Pikay
    Member
    Post count: 48

    I’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! ๐Ÿ™‚

    #197666
    David Martin – Support
    Moderator
    Post count: 20834

    Hi,

    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.

    #197712
    Pikay
    Member
    Post count: 48

    Again: 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

    #197715
    Swift Ideas – Ed
    Keymaster
    Post count: 15264

    So 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

    #198654
    Pikay
    Member
    Post count: 48

    it 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

    #198659
    David Martin – Support
    Moderator
    Post count: 20834

    Hi,

    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.

    #198666
    Pikay
    Member
    Post count: 48
    This reply has been marked as private.
    #198686
    Rui Guerreiro – SUPPORT
    Keymaster
    Post count: 25779

    Hi,

    That error usually means that you have an empty line. You should delete line 27 in your functions.php
    Give it a try.

    -Rui

    #198689
    Pikay
    Member
    Post count: 48

    that was easy … thanks a lot!

    would never ever find the error by myself ๐Ÿ˜›

    #198803
    David Martin – Support
    Moderator
    Post count: 20834

    Thanks Rui! – Glad it’s resolved.

    – David.

Viewing 12 posts - 1 through 12 (of 12 total)

You must be logged in and have valid license to reply to this topic.

License required for the following item
Login and Registration Log in · Register