Title: Adding PHP snippets?
Last modified: July 17, 2022

---

# Adding PHP snippets?

 *  Resolved [Paal Joachim Romdahl](https://wordpress.org/support/users/paaljoachim/)
 * (@paaljoachim)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/adding-php-snippet/)
 * Hey
 * I see no mention of adding PHP code snippets.
    Is this possible with your plugin?
 * I ask because I run a WordPress tutorial site and use Custom CSS and PHP snippets
   for my tutorials. I am trying to find a good plugin where I can add custom CSS
   and PHP.
 * Thanks.

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

 *  Plugin Author [SilkyPress](https://wordpress.org/support/users/diana_burduja/)
 * (@diana_burduja)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/adding-php-snippet/#post-15833797)
 * Hello,
 * no, the plugin can be used only to add CSS/JS/HTML custom codes, but not PHP 
   code snippets.
 *  Thread Starter [Paal Joachim Romdahl](https://wordpress.org/support/users/paaljoachim/)
 * (@paaljoachim)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/adding-php-snippet/#post-15834064)
 * Thank you for the reply Diana!
    Have a great day!
 *  [Diabolo](https://wordpress.org/support/users/cebuss/)
 * (@cebuss)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/adding-php-snippet/#post-15919129)
 * [@paaljoachim](https://wordpress.org/support/users/paaljoachim/)
 * If you haven’t found it already: [https://wordpress.org/plugins/code-snippets/](https://wordpress.org/plugins/code-snippets/)
 * Been using it for ages, just looking around to see if anything has surpassed 
   it (why I’m in here at the moment!).
 *  Thread Starter [Paal Joachim Romdahl](https://wordpress.org/support/users/paaljoachim/)
 * (@paaljoachim)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/adding-php-snippet/#post-15919363)
 * Hey [@cebuss](https://wordpress.org/support/users/cebuss/)
 * Yeah. Code snippets free version offers a way to add PHP snippets, but it does
   not offer CSS in an easy to use way.
 *  [Diabolo](https://wordpress.org/support/users/cebuss/)
 * (@cebuss)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/adding-php-snippet/#post-15919451)
 * [@paaljoachim](https://wordpress.org/support/users/paaljoachim/)
 * Actually, it does, but since the past few updates it’s getting a bit hidden; **
   one **of the reasons I’m looking around.
 * If you only looked at it recently perhaps it didn’t have the example snippets?
 * For CSS it’s:
 *     ```
       add_action( 'wp_head', function () { ?>
       <style>
   
       	/* write your CSS code here */
   
       </style>
       <?php } );
       ```
   
 * Still an excellent plugin but I’m not sure about the direction it is going in.
 *  Thread Starter [Paal Joachim Romdahl](https://wordpress.org/support/users/paaljoachim/)
 * (@paaljoachim)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/adding-php-snippet/#post-15919710)
 * Yeah. They did not include any code snippets. Thanks!
    I noticed that is the 
   way to add CSS using the Code Snippets plugin. It just does not feel very intuitive
   way of handling it. It feels a bit weird…
 * I too am not sure of the direction the free or pro plugin is going.

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

The topic ‘Adding PHP snippets?’ is closed to new replies.

 * ![](https://ps.w.org/custom-css-js/assets/icon-128x128.png?rev=1303730)
 * [Simple Custom CSS and JS](https://wordpress.org/plugins/custom-css-js/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/custom-css-js/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/custom-css-js/)
 * [Active Topics](https://wordpress.org/support/plugin/custom-css-js/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/custom-css-js/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/custom-css-js/reviews/)

 * 7 replies
 * 3 participants
 * Last reply from: [Paal Joachim Romdahl](https://wordpress.org/support/users/paaljoachim/)
 * Last activity: [3 years, 9 months ago](https://wordpress.org/support/topic/adding-php-snippet/#post-15919710)
 * Status: resolved