2014-06-19 5 views
2

부트 스트랩 테마를 사용하여 Wordpress 사이트에서 부트 스트랩 둘러보기를 구현하려하지만 스타일 시트 (CSS)와 JavaScrit를 연결할 때마다 작동하지 않습니다. 이 페이지는 스타일 시트 나 자바 스크립트를로드하지 않습니다.wordpress에서 부트 스트랩 둘러보기 구현하는 방법

내가 로컬로 작업 할 때 모든 설정이 제대로 작동하지만 wordpress에서 구현하려고하면 아무 것도 작동하지 않습니다.

Wordpress에서 모든 스타일 시트와 자바 스크립트를 설치해야하는 구체적인 방법이 있습니까?

<html <?php language_attributes(); ?>> 

<head> 
    <meta charset="<?php bloginfo('charset'); ?>" /> 

    <?php if (is_search()) { ?> 
     <meta name="robots" content="noindex, nofollow" /> 
    <?php } ?> 

    <title> 

    <?php wp_title('|', true, 'right'); ?> 

    </title>  
    <!-- Bootstrap core CSS --> 
    <link rel="stylesheet" type="text/css" href="<?php echo get_template_directory_uri();?>/css/bootstrap.css"> 

    <!-- Add custom CSS here --> 
    <link rel="stylesheet" type="text/css" href="<?php echo get_template_directory_uri();?>/css/bootstrap-tour.min.css"> 
    <link rel="stylesheet" type="text/css" href="<?php echo get_template_directory_uri();?>/css/landing-page.css"> 

    <script type="text/javascript" src="<?php echo get_template_directory_uri();?>/js/jquery-1.10.2.js"></script> 
    <script type="text/javascript" src="<?php echo get_template_directory_uri();?>/js/bootstrap.js"></script> 
    <script type="text/javascript" src="<?php echo get_template_directory_uri();?>/js/bootstrap-tour.min.js"></script> 
    <script type="text/javascript" src="<?php echo get_template_directory_uri();?>/js/script.js"></script> 

    <link rel="shortcut icon" href="/favicon.ico"> 

    <link rel="pingback" href="<?php bloginfo('pingback_url'); ?>"> 

    <?php wp_head(); ?> 

</head> 

<body <?php body_class(); ?>> 
+0

브라우저 콘솔에 오류가 있습니까? – brasofilo

+0

콘솔 오류는 스타일 시트 또는 자바 스크립트와 관련이 없습니다. 에로스는 임무 이미지와 관련이 있습니다. – user3757910

+0

"부트 스트랩 둘러보기"란 무엇입니까? – brasofilo

답변

2

당신이 child theme를 사용하는 경우는, get_template_directory_uri()는, 자식 테마를 들어 parent theme

의 경로를 제공하는 대신 get_stylesheet_directory_uri()를 사용합니다 :

이 내 헤더입니다.

관련 문제