Using the CC Snippets plugin

Hi,

I want to add a code snippet to my site so I installed the “Code Snippets” plugin. Unfortunately it does not seem to work.
So I checked for a CP alternative and found the CC Snippets plugin. Great.
Have installed it, but nothing seems to happen in my dashboard.
Am I missing something?

Guido

The plugin seems just an example. You have to manually edit the plugin main file to add the snippet(s) you need.

Usually for every site I build I put an “utility” plugin and then put the code there when I need some customization.

2 Likes

Thanks, after looking at the code I initially thought it was a normal functioning plugin.

Guido

If I have code snippets I want to add to a site, I usually add them as an mu-plugin.

Thanks Tim. Have already created a normal plugin, but will look into the mu-plugin feature.

The Code Snippets plugin is not supported by CP? In my install the snippet page is not being loaded.

Guido

I’ve never tried it. It says it requires a minimum version of WP of 5.0, so that’s good. Are you getting any JS errors?

Strangly enough no JS errors in console.
The snippet editor just doesn’t display. Have tried the plugin on 2 sites.

Well, there are many other plugins like that.

But if that fails, I could just fork the “original” one and make it work for CP. Its just that I couldnt offer much support nor regular releases.

cu, w0lf.

Hi,

I agree there are similar plugins, but this one is the most used one by far. It therefore may be useful to know why it’s not working with CP. For me that’s the reason for posting here.

Guido

If you install the Query Monitor plugin, you will see that the Code Snippets plugin generates a ton of JS errors on the page where it freezes. Those errors make clear it’s expecting React and the WP block editor to be installed. So no, that plugin won’t work on CP.

Understood.
I was expecting errors in browser console. Did not look further :wink:

Here there is an utility plugin you can use as an example.

Also contains code to avoid using SMTP plugins and to render an admin “playground” page I use when building sites.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.