• I have made a child theme of Twenty Fourteen to show titles of category archives only.

    It worked fine on my dev (Windows 7) server but not on the live (Linux) one. On the live server, the frontend was fine, but as soon as I tried to edit a post to add an image, I realised that the Media Library was broken – it looked empty and the little spinner just kept on whirling around. Galleries in posts also show a loading animation that never finishes.

    On changing back to the parent them, I got the “Warning: Cannot modify header information – headers already sent by (output started at … /wp-content/themes/twentyfourteen-child/functions.php:1)”.

    Both hinted at a problem with the child functions file, which just enqueues styles as recommended elsewhere. I have carefully checked for white space and can’t find any, and the file is saved as UTF-8 without BOM. I did the same in the 3 category archive files of the theme as well.

    <?php
    
    add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' );
    function theme_enqueue_styles() {
        wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
        wp_enqueue_style( 'child-style', get_stylesheet_uri(), array( 'parent-style' ) );
    }

    Now I am stumped.

Viewing 8 replies - 1 through 8 (of 8 total)
  • Thread Starter loiswakeman

    (@loiswakeman)

    bump.

    @loiswakeman, did you ever find a resolution to this problem?

    I’m using a child of CyberChimps’ Responsive theme on WP v4.2.2 and having the same issue

    @loiswakeman If you are still having issues I was able to resolve my problem by deleting the entire contents of my functions.php file, it’s just an empty text file now but works fine. It seems to be enqueueing the parent stylesheet automatically? Not sure why this should work, but it did and has not produced any side effects that I can see.

    Thread Starter loiswakeman

    (@loiswakeman)

    Hi there – never did get it to work, so I broke the rules and edited the parent theme! Annoying but necessary.

    I suspect it was an encoding issue, since it worked on my development site (running IIS/Windows) but not on the production site (Linux/Apache) – there is no BOM in the file but it still breaks.

    I’m also using a child theme for the Cyber Chimps responsive theme. I can’t empty the functions.php file because it has my custom post types in it? But I can’t get to my media library unless I do. Can anyone shed some light on this? I would like to keep my custom post types in my functions.php file but I need to get to my media library also.

    **UPDATE**
    Deleting the contents of my functions.php file does not fix the problem.

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    @justinapx8, that’s not the same problem. In future post on your theme’s support: https://cyberchimps.com/forum/free/responsive/

    ty

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Child theme breaks media library’ is closed to new replies.