Hello,
no, the plugin can be used only to add CSS/JS/HTML custom codes, but not PHP code snippets.
Thank you for the reply Diana!
Have a great day!
@paaljoachim
If you haven’t found it already: https://ww.wp.xz.cn/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!).
Hey @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.
@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.
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.