Title: How to add php code?
Last modified: August 21, 2016

---

# How to add php code?

 *  Resolved [taobo](https://wordpress.org/support/users/taobo/)
 * (@taobo)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/how-to-add-php-code/)
 * How to add php code in post after creating a snippet?
 * The shortcode is [php snippet=1]
 * And I indeed add <?php before php code
 * But I don’t know how to insert it into post.
 * I have tried [php], [php snippet=1], [php][/php], and [php snippet=1][/php]. 
   But none of them works.
 * Please help!
 * [http://wordpress.org/plugins/php-code-for-posts/](http://wordpress.org/plugins/php-code-for-posts/)

Viewing 6 replies - 1 through 6 (of 6 total)

 *  Plugin Author [Jamie](https://wordpress.org/support/users/themissingcode/)
 * (@themissingcode)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/how-to-add-php-code/#post-4222203)
 * Hi Taobo,
 * If you see the shortcode outputted instead of the php code, it is likely the 
   location does not support shortcodes in your theme. do other shortcodes work 
   in the same location?
 *  Thread Starter [taobo](https://wordpress.org/support/users/taobo/)
 * (@taobo)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/how-to-add-php-code/#post-4222204)
 * All shortcodes do not work in the same location.
    Thank you for your nice reply!
   🙂
 *  Plugin Author [Jamie](https://wordpress.org/support/users/themissingcode/)
 * (@themissingcode)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/how-to-add-php-code/#post-4222205)
 * Hi Taobo,
 * all you need to do is enable shortcodes in the theme location.
 * Take a look at this for more info: [http://codex.wordpress.org/Function_Reference/do_shortcode](http://codex.wordpress.org/Function_Reference/do_shortcode)
 * Thanks,
    TMC
 *  [Vinicius Roggerio da Rocha](https://wordpress.org/support/users/vinicius-roggerio-da-rocha/)
 * (@vinicius-roggerio-da-rocha)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/how-to-add-php-code/#post-4222253)
 * I’m using SyntaxHighlighter too, and its shortcodes are working fine. But the
   shortcodes [php snippet=1][/php] don’t (simply doesn’t appear, even a echo “Hello
   World”). There’s a conflict between these plugins? How to solve this?
 *  Plugin Author [Jamie](https://wordpress.org/support/users/themissingcode/)
 * (@themissingcode)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/how-to-add-php-code/#post-4222254)
 * it _is_ possible for it to conflict if the syntax highlighter uses the [php] 
   shortcode too.
 * At this time there is not an alternative shortcode for use, however in the future
   there may be an option for using an alternative shortcode, should there be sufficient
   demand 🙂
 * TMC
 *  [peaceparadise](https://wordpress.org/support/users/peaceparadise/)
 * (@peaceparadise)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/how-to-add-php-code/#post-4222263)
 * i put a paypal button form `<form action="https://www.paypal.com/cgi-bin/webscr"
   method="post">....</form>` in the ‘Save code’ section of the plugin and pasted
   the shortcode to a WP page. On viewing the page is blank (no button).
 * am I using the right plugin?
    if so, how to fix the goal is to have this paypal
   button form connect to my idevaffiliate software to keep track of affiliate purchases.
 * thanks

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘How to add php code?’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/php-code-for-posts_0d1022.svg)
 * [PHP Code for posts](https://wordpress.org/plugins/php-code-for-posts/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/php-code-for-posts/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/php-code-for-posts/)
 * [Active Topics](https://wordpress.org/support/plugin/php-code-for-posts/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/php-code-for-posts/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/php-code-for-posts/reviews/)

 * 6 replies
 * 4 participants
 * Last reply from: [peaceparadise](https://wordpress.org/support/users/peaceparadise/)
 * Last activity: [12 years, 1 month ago](https://wordpress.org/support/topic/how-to-add-php-code/#post-4222263)
 * Status: resolved