codesnippetspro / code-snippets

Code Snippets WordPress Plugin
https://codesnippets.pro
326 stars 106 forks source link

Add support for conditional tags #135

Open sheabunge opened 2 years ago

sheabunge commented 2 years ago

One feature we have requested pretty often is the ability to choose exactly when a snippet is evaluated. This could encompass both where (i.e., post type, page type, etc) and when (logged in, administrator, specific users, etc).

While this can be easily achieved by including conditional tags in Functions snippets, it seems that people would find an interface control helpful, and it would be especially useful for snippets that don't allow for PHP code (CSS/JS snippets).

Originally raised here: https://github.com/sheabunge/code-snippets/issues/95

nowrds commented 2 years ago

It's really annoying to add code snippets to individual pages, posts, etc. because you always have to edit them there and have no overview or control in the plugin itself. Conditionally adding snippets within the plugin in a clear interface is a must.