• Resolved Candymuse

    (@candymuse)


    I am using a Child Theme of Twenty Thirteen for my site.

    When I try to Set a Featured Image for a post, the Media Library window appears blank, even though I have images already uploaded to the Library.

    I pinpointed the functions.php file in my Child Theme folder as the problem. When I remove this file, the Media Library with image thumbnails appears properly.

    I want to include the functions.php update although this is a problem not being able to add images to posts.

    If someone knows of a fix, please help. My site is not live yet – I can provide a temp login if needed to view the site.

    Thank you.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    What’s in your functions.php file of your Child Theme?

    Thread Starter Candymuse

    (@candymuse)

    Additions for 4 features:
    1. Favicon
    2. Additional menus
    3. Custom CSS for login page
    4. Remove admin bar for users except admin

    (code below)

    I tried removing each item to see if that affected the issue. An empty functions.php file still causes the problem.

    <!– CMZ add favicon –>

    <?php
    function add_theme_favicon() {
    echo ‘<link rel=”shortcut icon” href=”‘ . get_bloginfo(‘stylesheet_directory’) . ‘/images/favicon.ico” >’;
    }
    add_action(‘wp_head’, ‘add_theme_favicon’);
    ?>

    <!– CMZ add extra menus –>

    <?php
    register_nav_menu( ‘primary’, __( ‘Navigation Menu’, ‘twentythirteen’ ) );
    register_nav_menu( ‘secondary’, __( ‘Bottom Menu’, ‘twentythirteen’ ) );
    register_nav_menu( ‘tertiary’, __( ‘Footer Menu’, ‘twentythirteen’ ) );
    register_nav_menu( ‘quaternary’, __( ‘Top Menu’, ‘twentythirteen’ ) );
    ?>

    <!– CMZ add CSS file for customizing login page –>
    <?php
    function my_login_stylesheet() { ?>
    <link rel=”stylesheet” id=”custom_wp_admin_css” href=”<?php echo get_bloginfo( ‘stylesheet_directory’ ) . ‘/style-login.css’; ?>” type=”text/css” media=”all” />
    <?php }
    add_action( ‘login_enqueue_scripts’, ‘my_login_stylesheet’ );
    ?>

    <!– CMZ remove admin bar for users except admin –>
    <?php
    add_action(‘after_setup_theme’, ‘remove_admin_bar’);
    function remove_admin_bar() {
    if (!current_user_can(‘administrator’) && !is_admin()) {
    show_admin_bar(false);
    }}
    ?>

    Thread Starter Candymuse

    (@candymuse)

    An empty functions.php file still causes the problem.

    I take this back – a blank functions.php file doesn’t cause a conflict.

    Let me do some more testing…

    Thread Starter Candymuse

    (@candymuse)

    Good news – it’s working now.

    I guess <!– –> commenting is not allowed in functions.php

    I removed these and it works fine now.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Child Theme functions.php conflicts with Media Library’ is closed to new replies.