I am building my own wordpress theme and I have such a problem. Media library doesn’t work, I can’t add any image to the page. I am using the latest version of wordpress.
Files available on github https://github.com/krysba/themes-wordpress
When I turn on the standard wordpress theme, the library works 🙁
I am asking for help in solving this problem.
2
Answers
If you have not tried, the first thing that i’ll tring it’s enable debug mode on WordPress from wp-config.php and check if some alerts or errors can help.
I think that you must try to comment all function.php and debugging it row by row.
At the first check i’ve found a wrong use of the function add_theme_support and in the enqeueing files.
For example the right way to user add_theme_support is on the after_setup_theme action:
Also the right way to enqueing scripts or styles is that:
See it on this page: https://developer.wordpress.org/themes/basics/including-css-javascript/