WordPress.org

Forums

Highwind
[resolved] Trouble with child theme (9 posts)

  1. drivehomepodcast
    Member
    Posted 2 years ago #

    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.

  2. paulwpxp
    Font hero
    Posted 2 years ago #

    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

  3. drivehomepodcast
    Member
    Posted 2 years ago #

    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?

  4. paulwpxp
    Font hero
    Posted 2 years ago #

    The function is missing the closing curly brace.

    The stylesheet looks right to me.

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

  5. drivehomepodcast
    Member
    Posted 2 years ago #

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

  6. paulwpxp
    Font hero
    Posted 2 years ago #

    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 ?

  7. paulwpxp
    Font hero
    Posted 2 years ago #

    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;
    }
  8. jameskoster
    Member
    Theme Author

    Posted 2 years ago #

    @drivehomepodcast You did activate the child theme, right? :-)

  9. jameskoster
    Member
    Theme Author

    Posted 2 years ago #

    Marking as resolved.

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic