• Resolved amst3l

    (@amst3l)


    So I have this problem with the media library. I want to upload images to my posts/pages but the problem is that the image library is not loading at all. When i check on the server (localhost) i can see the physical files but it’s simply not showing up.

    But when I changed the theme for the twenty sixteen one, the media library was working again and i was able to upload new images.

    Does anyone know how to fix this? Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • @amst3l Changing to the Twenty Sixteen theme was a good move on your part!

    What theme are you using? It’s hard to troubleshoot the issue when we don’t know what you’re working with ?? Have you checked the theme’s support forums whether the issue was reported and if there were any solutions posted? If there were no such issues, have you tried deactivating all plugins to see if the issue is resolved?

    Thread Starter amst3l

    (@amst3l)

    @mercime well it is my own theme.

    I’m currently into developing my own wordpress theme. So maybe there is a hook or something that needs to be added in the functions.php? I already searched high and low on the forums and went through the theme files of Twenty Sixteen but could not find anything that could help me.

    Thread Starter amst3l

    (@amst3l)

    I think i found it, did some more searching and copied the following from the twenty sixteen functions.php

    /*
    	 * Enable support for Post Thumbnails on posts and pages.
    	 *
    	 * @link https://codex.www.ads-software.com/Function_Reference/add_theme_support#Post_Thumbnails
    	 */
    	add_theme_support( 'post-thumbnails' );
    	set_post_thumbnail_size( 1200, 9999 );
    /*
    	 * Switch default core markup for search form, comment form, and comments
    	 * to output valid HTML5.
    	 */
    	add_theme_support( 'html5', array(
    		'search-form',
    		'comment-form',
    		'comment-list',
    		'gallery',
    		'caption',
    	) );
    
    	/*
    	 * Enable support for Post Formats.
    	 *
    	 * See: https://codex.www.ads-software.com/Post_Formats
    	 */
    	add_theme_support( 'post-formats', array(
    		'aside',
    		'image',
    		'video',
    		'quote',
    		'link',
    		'gallery',
    		'status',
    		'audio',
    		'chat',
    	) );

    Although i disregarded it at first. I needed the code above for my own template. But i think it has something to do with the thumbnail support ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Media library not working on my theme’ is closed to new replies.