掲題の件で行き詰まっております。
■読みこまないCSSのパス
"/www/hogehoge/wp-content/themes/themename/woocommerce/assets/css/woocommerce-layout.css"
■themename/functions.phpに記述したコード
/********************* CSS *********************/ function register_style() { wp_register_style('style', get_bloginfo('template_directory').'/style.css'); wp_register_style('woocommerce', get_bloginfo('template_directory').'/woocommerce/assets/css/woocommerce.css'); wp_register_style('woocommerce-layout', get_bloginfo('template_directory').'/woocommerce/assets/css/woocommerce-layout.css'); wp_register_style('shortcode', get_bloginfo('template_directory').'/library/css/shortcode.css'); wp_register_style('slider', get_bloginfo('template_directory').'/library/css/bx-slider.css'); if(!get_option( 'side_options_animatenone' )){ wp_register_style('animate', get_bloginfo('template_directory').'/library/css/animate.min.css'); } wp_register_style('lp_css', get_bloginfo('template_directory').'/library/css/lp.css'); } function add_stylesheet() { register_style(); wp_enqueue_style('style'); wp_enqueue_style('woocommerce'); wp_enqueue_style('woocommerce-layout'); wp_enqueue_style('slider'); wp_enqueue_style('animate'); wp_enqueue_style('shortcode'); if(is_singular( 'post_lp' )) { wp_enqueue_style('lp_css'); } elseif (is_home() || is_front_page()) { } } add_action('wp_print_styles', 'add_stylesheet');
■同じような記述で読み込んでいるCSSファイルもある
下記のCSSのパスのものは読み込んでいます。
"/www/hogehoge/wp-content/themes/themename/woocommerce/assets/css/woocommerce.css"
■このようにプラグインであるwoocommerceのCSSを設置しようとした背景
プラグインの中にあるCSSを直接編集する手もありますが、更新がかかった時にすべて消えてしまうため、編集したいCSSだけthemenameもってきました(子テーマのイメージです)。
以上、どのように記述すればwoocommerce-layout.cssを読み込むことができるのかご教示いたけるとありがたいです。
回答1件
あなたの回答
tips
プレビュー