2013-11-01 1 views
0

나는 단지 부트 스트랩 3으로 html 사이트를 만든다. 이제 나는 그것을 wordpress 테마로 만들려고 노력하고있다. 내가 업로드 그런부트 스트랩 3를 워드 프레스 테마로 변환. WordPress는 나의 부트 스트랩 스타일 시트를 잡을 수 없다.

@import url('css/bootstrap.css'); 
@import url('css/bootstrap.min.css'); 

: 나는 index.html을 나는 나는이 방법처럼 내 부트 스트랩 CSS 파일을 가져올 수있는 style.css에서 "있는 style.css"

라는 CSS 파일을 &을을 index.php 할 수 있도록 서버상의 테마. 나는 주제를 활성화한다. 그러나 내 사이트는 어떤 CSS도없는 것처럼 보입니다. css가없는 html 사이트처럼 보입니다. 나는 여러모로 시도했지만 왜 내 테마가 CSS를 찾지 못하는지 이해하지 못합니다. 나는 내 테마에서 PHP 함수를 사용하는 것과 같은 나의 테마를 변경하지 않는다.

만약 당신이 남자이 문제의 해결책을 알고 나를 도와주세요.

답변

0

당신은 <link rel="stylesheet" type="text/css" href="/pathtothecss/theme.css">

로 HTML에있는 style.css 연결해야 그리고 난 당신이 @import를 사용하지 않는 것이 좋습니다. 모든 CSS 스타일 시트를 사이트의 <head> 섹션에 연결하기 만하면됩니다.

0

@import url('/css/bootstrap.min.css');

functions.php에서 부트 스트랩 CSS/JS를 포함한
1

사용 WP의 enqueue_scripts 기능

function add_style() { 

wp_register_style('bootstrap-css',get_template_directory_uri()."/css/bootstrap.css"); 
wp_register_style('bootstrap-min-css',get_template_directory_uri()."/css/bootstrap.min.css"); 

wp_enqueue_style('bootstrap-css'); 
wp_enqueue_style('bootstrap-min-css'); 
} 

add_action('wp_enqueue_scripts', 'add_style'); 
관련 문제