• I am editing this php file here: http://pastebin.com/VuH3C1XH

    Line 54. I need to replace this line with this code:

    <?php if (is_user_logged_in ()): ?>
        <?php
            $current_user = wp_get_current_user ();
            echo get_avatar ($current_user->user_email, 100);
        ?>
    <?php else: ?>
        <img src="http://richtrix.com/wp-content/uploads/2016/07/Register.jpg" alt="No avatar is available" />
    <?php endif; ?>

    I edited this on my parent theme (bad, I know) and the changes worked perfectly. I undid the changes and went to my child theme to implement this edit.

    Problem is, no matter how I edit my child theme functions.php, my website breaks down. Can someone please assist me in the correct way to make this edit?

    I would be so grateful! I am driving myself insane trying to do this.

    Jeff Arnold

Viewing 6 replies - 1 through 6 (of 6 total)
  • Hi Jeff,

    It appears you’re using a commercial theme so please go to their official support channel. In order to be good stewards of the WordPress community, and encourage innovation and progress, we feel it’s important to direct people to those official locations.

    Product support URL: http://theme.co/x/support/

    Forum volunteers are also not given access to commercial products, so they would not know why your commercial theme or plugin is not working properly. This is one other reason why volunteers forward you to the commercial product’s vendors. The vendors are responsible for supporting their commercial product.

    Hope you understand. 🙂

    Thread Starter Rapforthemoment

    (@rapforthemoment)

    I understand completely. I figured I would start out on here before I asked my theme support. Thank you for the help though!

    from what template file is the original code?

    generally, you can only more or less use pluggable functions, filters, and actions in functions.php of a child theme.

    Thread Starter Rapforthemoment

    (@rapforthemoment)

    It lies within superfly-menu.php which is a plugin that came bundled with my theme XTheme. Thank you Michael for joining in on the conversation!

    it really sounds as if the theme’s developer is the best to contact with your question.

    Thread Starter Rapforthemoment

    (@rapforthemoment)

    Thank you for your input! I have contacted them and am awaiting their response!

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Code won't work in Child Theme Functions.php’ is closed to new replies.