title: How to programatically & dynamically add CSS & JS while creating wordpress posts in PHP
body: <p>I am creating posts with the wp_insert_post() function. For certain post categories, I need to dynamically add CSS &amp; JS into the post. Is there any inbuilt function or 3rd party plugins through which I could do that?</p>
  
  <p>I tried wp_enqueue_* functions, using child themes but they apply scripts to all posts irrespective of categories.</p>