WordPress.org

Support

Support » Themes and Templates » Highwind » [Resolved] Trouble with child theme

[Resolved] Trouble with child theme

  • First, I will apologize by saying that everything I know about coding, I have learned in the past 24 hours.

    So, I’m wanting to change the round picture in the header. For some reason, it isn’t showing the admin’s picture (I’ve uploaded that through Gravatar). I know I have to create a child them, but, again, I’m new to this.

    Our site is hosted through GoDaddy, so went in to edit the ftp. I created a folder called “highwind-child” under Themes. I have two files included:

    functions.php
    add_filter( ‘highwind_header_gravatar’, ‘jk_remove_header_gravatar’ );
    function jk_remove_header_gravatar() {
    return false;
    }

    style.css
    /*
    Theme Name: Highwind Child
    Theme URI: https://jameskoster.co.uk/highwind/
    Description: Highwind is a lightweight, free WordPress theme designed to showcase content. It features a clean design with a strong focus on typography, plus a bunch of presentational options and widgetised regions allowing you to give your site a unique touch.
    Author: jameskoster
    Author URI: http://jameskoster.co.uk
    Version: 0.1.0
    */

    So, what am I doing wrong? I just want to take the header image out. I know it isn’t complicated, but this is just over my head.

Viewing 8 replies - 1 through 8 (of 8 total)
  • paulwpxp

    @paulwp

    Font hero

    Missing one line in style.css top comment block

    Template: highwind

    So try this

    /*
    Theme Name: Highwind Child
    Theme URI: https://jameskoster.co.uk/highwind/
    Description: Highwind is a lightweight, free WordPress theme designed to showcase content. It features a clean design with a strong focus on typography, plus a bunch of presentational options and widgetised regions allowing you to give your site a unique touch.
    Author: jameskoster
    Author URI: http://jameskoster.co.uk
    Template: highwind
    Version: 0.1.0
    */

    and in functions.php don’t forget to begin it with opening php tag, the ending is optional and better to not have one.

    That filter might or might not work depends on the hook order, must see how parent theme manage to hook it.

    Also, check this out.
    http://codex.wordpress.org/Function_Reference/_return_false

    Okay, I changed to this:

    functions.php:
    <?php
    add_filter( ‘highwind_header_gravatar’, ‘jk_remove_header_gravatar’ );
    function jk_remove_header_gravatar() {
    return false;

    style.css:
    /*
    Theme Name: Highwind Child
    Theme URI: https://jameskoster.co.uk/highwind/
    Description: Highwind is a lightweight, free WordPress theme designed to showcase content. It features a clean design with a strong focus on typography, plus a bunch of presentational options and widgetised regions allowing you to give your site a unique touch.
    Author: jameskoster
    Author URI: http://jameskoster.co.uk
    Template: highwind
    Version: 0.1.0
    */

    Still no luck. Any ideas?

    paulwpxp

    @paulwp

    Font hero

    The function is missing the closing curly brace.

    The stylesheet looks right to me.

    What didn’t work ? What’s the error message ?

    I’m not getting an error message. The header is still just showing the blank circular image.

    paulwpxp

    @paulwp

    Font hero

    I’m sorry I don’t quite understand. So this is not about trouble with child theme. This is about gravatar not showing up in the header area of theme, and you don’t want to fix it ? you want to take it out ?

    paulwpxp

    @paulwp

    Font hero

    I just installed this theme in my local dev, the admin gravatar displays as header image just fine. So if your gravatar doesn’t showup, make sure the admin email is the same one with gravatar account.

    Still, if you really want to take it out, use this in child theme’s functions.php (assuming your child theme installed properly).

    add_filter( 'highwind_header_gravatar', '__return_false' );

    To use gravatar from different email other than admin email, use his

    add_filter( 'highwind_header_gravatar_email', 'my_site_avatar' );
    
    function my_site_avatar( $email ) {
    	$email = 'myemail@example.com';
    	return $email;
    }
    Theme Author James Koster

    @jameskoster

    @drivehomepodcast You did activate the child theme, right? 🙂

    Theme Author James Koster

    @jameskoster

    Marking as resolved.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘[Resolved] Trouble with child theme’ is closed to new replies.
Skip to toolbar