简体   繁体   中英

Styling works on index.php but disappears on single.php

I'm trying to output woocommerce product in single.php. But the styling breaks for some reason that I can't figure out, despite it is working very well on the index page.

Without looping anything from the database, just requiring get_header function and get_footer function

function styles_and_scripts(){
  wp_enqueue_style('style', get_stylesheet_uri());
  wp_enqueue_style('bulma', get_stylesheet_directory_uri().'/assets/css/bulma.css', null, false);
}
add_action('wp_enqueue_scripts', 'styles_and_scripts');

Bulma navbar remove it's styling. I guess it has something to do with the link.

Check if bootstrap css isn't loading on single.php. It conflicts with Bulma framework.

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