• Resolved Martin Illguth

    (@martin-illguth)


    HI there,

    i bought ignite-plus and i have to add some custom content in between posts and alter the footer and add custom fields to the post-class.

    So far i implemented my changes directly in the ignite-plus-files, which is wrong and therefore i want to create a child theme.

    The online help section says i have to only copy the files from the ignite-plus folder to the ignite-plus-child folder.

    So far the new files appear in the editor but i am unable to edit them. As i click them, the screen gets white and no page is loaded.

    Could somebody tell me how to properly change php-files from the parent theme within a child theme?

Viewing 15 replies - 1 through 15 (of 15 total)
  • Theme Author Ben Sibley

    (@bensibley)

    Hi Martin,

    Thanks so much for upgrading!

    There are a number of things that could be going wrong, so I’m going to start from the top , and I apologize in advance if I’m telling you things you already know.

    First, here is an empty starter child theme you can use for Ignite Plus: click to download

    Once you have the child theme, you want to copy only the files in Ignite Plus that you’ll be editing. For instance, to alter the footer, you want to copy the footer.php file from Ignite Plus into the Ignite Plus Child theme. Then both themes should have an identical copy of the footer.php file.

    Once you do this, the footer.php file in the child theme will load instead of the footer.php file in Ignite Plus allowing you to make changes. Please note that you won’t notice any difference until you activate the child theme on your site.

    If you’ve done this and you’re receiving a blank white screen after editing a child theme file, this is due to a fatal error with the PHP code. Most likely, there is an error with the syntax that is breaking the code.

    Thread Starter Martin Illguth

    (@martin-illguth)

    Hi Ben,

    thank you for your reply!
    No excuse needed for too much informations, maybe there is something i missed.

    I like the theme so far very much, so thank you for that! 🙂

    Hmmm, i deleted all files and copied them over one by one.
    It is working with all files, except the functions.php (despite the fact the same file is working in the parent ignite-plus-theme)

    Do you know, why i can´t move that one over?

    Theme Author Ben Sibley

    (@bensibley)

    Ah yes, the functions.php file is a special exception and does not need to be copied over. The child theme has its own functions.php file that is loaded in addition to the parent theme’s functions.php, rather than instead.

    Thread Starter Martin Illguth

    (@martin-illguth)

    Ahh, works like charm! 🙂

    I copied the functions.php file from ignite-plus over to the child theme and removed all functions except my custom ones. Now it works! Thank you!

    The last question i have:
    I need to extend the social media array with “issuu”. I managed to add it inside the ignite-plus theme function “ct_ignite_customizer_social_media_array” as a new entry in the social_sites-array (and also added it to the square_icons-array). I replaced the icons with my own and some CSS (since issuu has no font-icon).

    So now to the question: How do i do that in my child theme rather then the parent theme? I need to overwrite the whole function from the parent theme.

    Theme Author Ben Sibley

    (@bensibley)

    Great I’m glad to hear that 🙂

    You’ve already done the hard parts of adding a new social icon – the last few steps for putting it into a child theme are easy.

    If you check out the “ct_ignite_customizer_social_media_array()” function, you’ll see there is a function_exists() check before it. This means the function will only be used if it is not already defined. All you have to do is copy the social array function into your child theme’s functions.php file, and it will automatically override the parent theme’s version. This happens because the child theme’s functions.php file always loads first, allowing you to override functions like this.

    As for outputting the social icons, I just realized I forgot to make the “ct_ignite_output_social_icons” function overridable when I last made some modifications. What you can do is keep the modified output function in Ignite Plus for now, and save the code in a text file somewhere on your computer. Then, when you update Ignite Plus, the function will be overwritten in Ignite Plus with one that has a function_exists() check, and you can add the version you modified saved to your child theme.

    Does that make sense? Sorry this got so complicated.

    Hi Guys

    I tried adding links to the footer and did this
    <footer class=”site-footer” role=”contentinfo”>
    <h3>“><?php bloginfo(‘title’); ?></h3>

    no my footer is not visible on my site http://shots011.com/

    please help

    @tshumak Are you working on it?

    Thread Starter Martin Illguth

    (@martin-illguth)

    @ben
    Thanks for the informations. I´m currently busy working on another important project and i will resume on the wordpress thingy on monday. I will leave you a reply then.

    @tshumak

    <footer class="site-footer" role="contentinfo">
    <h3>"><?php bloginfo('title'); ?></h3>

    Obviosly that code is wrong. Remove the "> after your opening h3-tag so i looks like this:

    <footer class="site-footer" role="contentinfo">
    <h3><?php bloginfo('title'); ?></h3>
    Theme Author Ben Sibley

    (@bensibley)

    @martin cool thanks for the update. I just released an update yesterday for Ignite Plus that makes the social icons output function overridable, so that should be much easier now.

    Thread Starter Martin Illguth

    (@martin-illguth)

    Hi Ben,

    thank you for the update. I copied the social-media-related functions into the child`s function.php and altered them according to my needs. Everything works fine! 🙂

    Theme Author Ben Sibley

    (@bensibley)

    Awesome, no problem 🙂

    Thread Starter Martin Illguth

    (@martin-illguth)

    Hi Ben!

    I have one last question for you:

    On the single-post-page there are two navigation links (previous post, next post).
    I have a german language page and those navigation links are already translated.

    But if there is no next/previous post, then there`s the english language links (no older posts, no newer posts).
    The translations would be:
    No older posts -> Keine älteren Beiträge
    No newer posts -> Keine neueren Beiträge

    Is there a way to translate them easily?

    Theme Author Ben Sibley

    (@bensibley)

    Hey Martin,

    Yea check out this guide for translating: https://www.competethemes.com/help/translate-theme-ignite/

    You won’t need to create new files, but instead open and edit the de_DE.po file with the missing translations. Then regenerate the de_DE.mo file after adding your translations.

    Thread Starter Martin Illguth

    (@martin-illguth)

    Thanks for the informations! 🙂

    Theme Author Ben Sibley

    (@bensibley)

    Sure thing!

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘Adding php-files to child theme?’ is closed to new replies.