这个脚本最后加载我的孩子主题吗?

时间:2016-10-26 07:07:22

标签: php wordpress

我的子主题样式表似乎无法正常工作。我认为脚本需要更改以加载它,但我不确定如何更改优先级。

Website url

这是functions.php文件:



<?php
function thim_child_enqueue_styles() {
        // Enqueue parent style
        wp_enqueue_style( 'thim-parent-style', get_template_directory_uri() . '/style.css' );
}

add_action( 'wp_enqueue_scripts', 'thim_child_enqueue_styles', 100);
&#13;
&#13;
&#13;

1 个答案:

答案 0 :(得分:1)

您应该click也是'parent-style'并将其设置为'child-style'的依赖项。它将确保子主题样式表在其后加载。因此,相应地重写$('[name=footerLayout]').change(function() { console.log($(this).val()); }); $('[name=footerLayout]').click(function() { console.log('clicked'); }); 函数:

enqueue

查看documentation