This topic has 7 replies, 2 voices, and was last updated 9 years by Radu.

  • Author
  • #60465
     wd7080
    Participant

    Hello,

    When I add a function to the child theme functions.php it doesn’t apply. Do I have to add ?> to the file? I did and still the functions are not readable.

    Thanks

    #60466
     wd7080
    Participant

    This is all of what I have in my functions.php:

    COPY CODE
    <?php
    /**
     * @package WordPress
     * @subpackage Kleo
     * @author SeventhQueen <themesupport@seventhqueen.com>
     * @since Kleo 1.0
     */
    
    /**
     * Kleo Child Theme Functions
     * Add custom code below
    */ 
    // ADD FAVICON TO HEADER 
    function blog_favicon(){echo '<link rel="Shortcut Icon" type="image/x-icon" href="'.get_bloginfo('template_directory').'/favicon.ico">';}
    add_action('wp_head', 'blog_favicon');
    ?>
    #60541
     Radu
    Moderator

    Hello,

    The function.php from child is not required to have ?> at the end.

    blog_favicon() function is not part as kleo framework, you can add favicon to your site/blog from Wp-admin -> Theme Options -> General settings -> Favicon

    Cheers

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #60571
     wd7080
    Participant

    Well, I am using multisite and in multisites I can’t upload a FAV ico. I insert this code to the functions.php but for some reason I can’t get it work:

    COPY CODE
    define('ALLOW_UNFILTERED_UPLOADS', true);
    add_filter('upload_mimes', 'pixert_upload_types');
    function pixert_upload_types($existing_mimes=array()){
    $existing_mimes['flv'] = 'video/x-flv';
    $existing_mimes['mid'] = 'audio/midi';
    return $existing_mimes;
    }

    Please check: https://wordpress.org/support/topic/sorry-this-file-type-is-not-permitted-for-security-reasons-3

    #60573
     wd7080
    Participant

    and one more thing, am I safe to delete what the child default functions.php below? Does the block below import data from somewhere else or it’s just informational comments?

    COPY CODE
    <?php
    /**
     * @package WordPress
     * @subpackage Kleo
     * @author SeventhQueen <themesupport@seventhqueen.com>
     * @since Kleo 1.0
     */
    
    /**
     * Kleo Child Theme Functions
     * Add custom code below
    */ 
    #60592
     Radu
    Moderator

    Try this solution : http://wpsmith.net/2010/tutorials/different-favicons-for-wordpress-3-0-multisite/

    Or try this plugin ( Multisite – WordPress MU ) : https://wordpress.org/plugins/favicon-switcher/

    That comments are only informational.

    Cheers

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #60596
     wd7080
    Participant

    Thanks, I want to confirm with you the following:

    1. I have deleted the default functions.php that comes with the theme, is there anything to worry about?
    Another thing:
    2. I added <?php } ?> to the end of functions.php. Is this fine?

    I appreciate your help.

    #60670
     Radu
    Moderator

    It’s not need to add that to functions,but if you not receive any error it’s ok.

    Cheers

    Radu

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
Viewing 8 posts - 1 through 8 (of 8 total)

The forum ‘General questions’ is closed to new topics and replies.

Log in with your credentials

Forgot your details?