Title: Add CSS in PHP
Last modified: April 2, 2023

---

# Add CSS in PHP

 *  Resolved [ildomandatore](https://wordpress.org/support/users/ildomandatore/)
 * (@ildomandatore)
 * [3 years, 2 months ago](https://wordpress.org/support/topic/add-css-in-php/)
 * A plugin author told me to edit a folder for the theme. To make CSS changes to
   your plugin.
 * But I am convinced that it would be enough to insert the CSS in PHP with your
   plugin.
 * Unfortunately I can’t add the CSS directly. Please add this feature. 🙂
 * How do I enter CSS code into PHP with your plugin?
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fadd-css-in-php%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Plugin Author [Mircea Sandu](https://wordpress.org/support/users/gripgrip/)
 * (@gripgrip)
 * [3 years, 2 months ago](https://wordpress.org/support/topic/add-css-in-php/#post-16620524)
 * Hi [@ildomandatore](https://wordpress.org/support/users/ildomandatore/),
 * I’m not sure I understand the full details here. You can add CSS with WPCode 
   and it doesn’t have to be inserted in PHP, CSS styles apply to the whole page
   where they are loaded.
 * Can you please give us more details about what you are trying to achieve?
 *  Thread Starter [ildomandatore](https://wordpress.org/support/users/ildomandatore/)
 * (@ildomandatore)
 * [3 years, 2 months ago](https://wordpress.org/support/topic/add-css-in-php/#post-16620953)
 * I’m trying to put the css in the php to bypass the Popular Post plugin theme 
   change.
 *  Plugin Author [Mircea Sandu](https://wordpress.org/support/users/gripgrip/)
 * (@gripgrip)
 * [3 years, 2 months ago](https://wordpress.org/support/topic/add-css-in-php/#post-16621123)
 * Hi [@ildomandatore](https://wordpress.org/support/users/ildomandatore/),
 * I’m sorry but we still need more details to get a clear understanding of what
   you are trying to achieve. Have you tried adding CSS using the Code Type CSS 
   for WPCode Snippets? [https://a.supportally.com/i/Sc6Xp2](https://a.supportally.com/i/Sc6Xp2)
 * You can use that to add custom CSS to any page on your site.
 *  Thread Starter [ildomandatore](https://wordpress.org/support/users/ildomandatore/)
 * (@ildomandatore)
 * [3 years, 2 months ago](https://wordpress.org/support/topic/add-css-in-php/#post-16621303)
 * Not matter, I’ve solved it. 🙂

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

The topic ‘Add CSS in PHP’ is closed to new replies.

 * ![](https://ps.w.org/insert-headers-and-footers/assets/icon-256x256.png?rev=2758516)
 * [WPCode - Insert Headers and Footers + Custom Code Snippets - WordPress Code Manager](https://wordpress.org/plugins/insert-headers-and-footers/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/insert-headers-and-footers/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/insert-headers-and-footers/)
 * [Active Topics](https://wordpress.org/support/plugin/insert-headers-and-footers/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/insert-headers-and-footers/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/insert-headers-and-footers/reviews/)

 * 6 replies
 * 2 participants
 * Last reply from: [ildomandatore](https://wordpress.org/support/users/ildomandatore/)
 * Last activity: [3 years, 2 months ago](https://wordpress.org/support/topic/add-css-in-php/#post-16621303)
 * Status: resolved