• I added a VERY basic child theme to add some favicons. I followed the instructions on the how to, and I’ve included the header section of my style.css and the entire text of my functions.php file below.

    As soon as I activated this child theme, my media library will no longer load in grid view, but will load in list view.

    I searched for help on this and everyone is saying to disable themes and plugins to find the problem. In this case I know my child theme is the problem, but how do I fix it? What did I do wrong?

    header of style.css:

    /*
     Theme Name:   Weaver II Child
     Theme URI:    https://stitchesnscraps.com/weaver-ii-child
     Description:  Weaver II Child Theme
     Author:       Pia Thadani
     Author URI:   https://stitchesnscraps.com
     Template:     Weaver II
     Version:      1.0.0
     License:      GNU General Public License v2 or later
     License URI:  https://www.gnu.org/licenses/gpl-2.0.html
     Tags:         testing
     Text Domain:  Weaver-II-child
    */

    functions.php

    <?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' ) );
    }
    
    function favicon_link() {
        echo "\n"
     . '
    <link rel="apple-touch-icon" sizes="57x57" href="/favicons/apple-touch-icon-57x57.png" />' . "\n"
     . '
    <link rel="apple-touch-icon" sizes="114x114" href="/favicons/apple-touch-icon-114x114.png" />' . "\n"
     . '
    <link rel="apple-touch-icon" sizes="72x72" href="/favicons/apple-touch-icon-72x72.png" />' . "\n"
     . '
    <link rel="apple-touch-icon" sizes="144x144" href="/favicons/apple-touch-icon-144x144.png" />' . "\n"
     . '
    <link rel="apple-touch-icon" sizes="60x60" href="/favicons/apple-touch-icon-60x60.png" />' . "\n"
     . '
    <link rel="apple-touch-icon" sizes="120x120" href="/favicons/apple-touch-icon-120x120.png" />' . "\n"
     . '
    <link rel="apple-touch-icon" sizes="76x76" href="/favicons/apple-touch-icon-76x76.png" />' . "\n"
     . '
    <link rel="apple-touch-icon" sizes="152x152" href="/favicons/apple-touch-icon-152x152.png" />' . "\n"
     . '
    <link rel="apple-touch-icon" sizes="180x180" href="/favicons/apple-touch-icon-180x180.png" />' . "\n"
     . '
    <link rel="shortcut icon" href="/favicons/favicon.ico" />' . "\n"
     . '
    <link rel="icon" type="image/png" href="/favicons/favicon-192x192.png" sizes="192x192" />' . "\n"
     . '
    <link rel="icon" type="image/png" href="/favicons/favicon-160x160.png" sizes="160x160" />' . "\n"
     . '
    <link rel="icon" type="image/png" href="/favicons/favicon-96x96.png" sizes="96x96" />' . "\n"
     . '
    <link rel="icon" type="image/png" href="/favicons/favicon-16x16.png" sizes="16x16" />' . "\n"
     . '
    <link rel="icon" type="image/png" href="/favicons/favicon-32x32.png" sizes="32x32" />' . "\n"
     . '
    <meta name="msapplication-TileColor" content="#da532c" />' . "\n"
     . '
    <meta name="msapplication-TileImage" content="/favicons/mstile-144x144.png" />' . "\n"
     . '
    <meta name="msapplication-config" content="/favicons/browserconfig.xml" />' . "\n";
    }
    add_action( 'wp_head', 'favicon_link' );
    
    ?>

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Adding a child theme broke my media library, and I don't know why’ is closed to new replies.