add code automatically for any article/post
The easiest way is to create a block and add your code to it if it's html or javascript code. Then for Show block on specific pages select only on the listed pages and add articles/* This will affect all the pages that have articles in their url.

If it's php, you will need to create a custom page tpl file. 

go to drupal/sites/all/themes/mythemename/templates and add page--articles.tpl.php This will affect all the pages that have articles in their url.