将引导脚本添加到页脚

时间:2017-11-21 11:11:14

标签: html wordpress twitter-bootstrap scripting

我想将引导脚本添加到页脚。但他们仍然在头球。我哪里错了?https://developer.wordpress.org/reference/functions/wp_enqueue_script/

它说脚本可以放在具有最后一个函数属性$in_foot: true/false的页脚中。 添加它们的另一种方法是使用wp_foot操作。 亲爱的堆栈plz检查:

网站的实例是:  slotsviewer.com,   http://онлайн-казино-украины.com.ua/

2 个答案:

答案 0 :(得分:0)

使用下面的代码

wp_enqueue_script('bootstrapjs', get_template_directory_uri().'/js/bootstrap.min.js', array('jquery'), false, true );

第五个参数是页脚中的show script,你没有使用第五个参数,默认是false(显示在头部)。

答案 1 :(得分:0)

在主题模板中使用functions.php文件添加:

login() {
  this.authenticationService.login(this.account)
.subscribe(
  (data: {token: Token}) => { // provide the data type explicitly
    const token: Token = data.token; // safely use your object
    }
  )
}

希望它有所帮助!