Custom CSS per page in Wordpress

后端 未结 4 1439
隐瞒了意图╮
隐瞒了意图╮ 2021-01-21 03:35

Good Morning All,

I have created a different background and a few other images for certain pages within our site. Currently the below code is working well with the \"kid

4条回答
  •  半阙折子戏
    2021-01-21 04:12

    Note: I know the 3 current answers are a common solution to this problem for WP, but in practice, I hate it. It produces bloated HTML and monolithic CSS :/

    Answer: You could use a template file assigned to any number of pages to add specific CSS/Javascript like so:

    
    

    Source: http://codex.wordpress.org/Function_Reference/wp_enqueue_script

提交回复
热议问题