Add custom css to a page template in wordpress

前端 未结 3 603
甜味超标
甜味超标 2021-02-18 15:26

Hi i need some help with the creation of a custom css file for my page template. There are many topics out there regarding this issue but with each thread i read i get mo

3条回答
  •  难免孤独
    2021-02-18 16:09

    How about this solution ?

    '."\n"
    }
    add_action('wp_head', 'mypage_head');
    ?>
    
    

    You can use wp_head hook to add you custom stuff (Javascript, CSS..) into your custom template. I think this way is better because all changes will contain in your template file, so you don't have to check in another place.

    I get this solution from : http://scratch99.com/wordpress/development/custom-page-template-external-css-file/.

提交回复
热议问题