I have to run some code in each and every WordPress article.

The issue is, automatically, WordPress doesn't execute any PHP in posts. I have attempted an abundance of plug ins (including ExecPHP and suchlike) but with no success. How do i get PHP to operate in WordPress?

could it be exactly the same code for each article? if that's the case why not alter the wordpress file that produces the publish and add the code inside?

This really is harmful as it can certainly crash your whole site when not guaranteed correctly, but you can utilize the php function eval() to complete php code.

See:

http://ca.php.net/manual/en/function.eval.php

Goes such as this:

  • Place your code right into a wordpress plugin.
  • Either register a shortcode -or- hook in to the display associated with a publish with a hook/filter.

Done.