Some questions about how proper add 2 CSS file in a WordPress theme?

It seems like you’re using dependencies the opposite way of how they should be used. In the WordPress Codex, they try to explain how it’s supposed to be used. $deps (array) (optional) Array of handles of any stylesheets that this stylesheet depends on. Dependent stylesheets will be loaded before this stylesheet. Since your style2.css is … Read more

WordPress import media error

Admittedly, this is a guess. The exporter, in the versions I have used, does not save your files to a local disk. It creates an XML file with references to your images on a server somewhere. When the importer reads the XML file, it will download from that server and upload to your new installation. … Read more

Admin – no Featured image choice in create new/page|post

Your theme has not registered support for post thumbnails. You need to add one of these as appropriate: add_theme_support( ‘post-thumbnails’ ); add_theme_support( ‘post-thumbnails’, array( ‘post’ ) ); // Posts only add_theme_support( ‘post-thumbnails’, array( ‘page’ ) ); // Pages only add_theme_support( ‘post-thumbnails’, array( ‘post’, ‘movie’ ) ); // Posts and Movies See the Codex (link above) … Read more

How to register and enqueue JavaScript files without breaking plugin dependencies?

I would use jquery-masonry included in WordPress core: function my_scripts() { wp_enqueue_script( ‘jquery-masonry’, true ); } add_action( ‘wp_enqueue_scripts’, ‘my_scripts’ ); If you really need the standalone masonry library, you should use your “first way” but I would not use “my_masonry” as handle for the script, I would use “masonry” if you have not modified the … Read more