简体   繁体   中英

WordPress doesn’t load css and js files after installing on server

After moving my local wordpress installation to my webspace, wordpress doesn't load css, js and some image files. The page displays only text without any styling or functionality (see Click here ).

What am I doing wrong? Hope you can help me..

Proper way to import the css and js files

add_action('wp_enqueue_scripts', 'load_scripts', 12);
function load_scripts() {
    wp_enqueue_script('filename', get_template_directory_uri() . '/js/filename.js', array(), '1.0.0', true );


}

If the issues are with images make sure you hardcode properly.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM