• Resolved Imagecsdsubscriber

    (@csdsubscriber)


    I’ve created a snippet and I’m looking everywhere, but I don’t see a shortcode I can use for it.

    ???

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Contributor ImageCarolina

    (@carolinaop)

    Hi @csdsubscriber ,

    Thank you for your question! By default, snippets created with our plugin don’t generate a shortcode — they are usually executed directly (for example, PHP code runs on your site automatically once the snippet is activated).

    If you’d like to output content inside a post or page with a shortcode, you can wrap your code inside a custom function and then register a shortcode for it. Here’s a quick example:

    function my_custom_snippet() {
    return "Hello, this is my snippet output!";
    }
    add_shortcode( 'my_snippet', 'my_custom_snippet' );

    Once added as a snippet and activated, you can use [my_snippet] anywhere in your posts or pages to display the output.

    You can also browse our Snippet Community Cloud Library for other examples of snippets that generate shortcodes: https://codesnippets.cloud/search

    Best regards,

    Carolina

    Thread Starter Imagecsdsubscriber

    (@csdsubscriber)

    Thanks for your reply. I saw a video showing the shortcode being generated below the code window. No more then?

    How would this wrapper code you’ve described get “registered?”

    Thread Starter Imagecsdsubscriber

    (@csdsubscriber)

    Never mind I figured it out. Thank you! 🙂

    Plugin Contributor ImageCarolina

    (@carolinaop)

    Hi @csdsubscriber,

    That’s great to hear—I’m glad you were able to figure out! Thanks for letting us know.
    I’ll go ahead and close this ticket for now, but please feel free to open if you need further assistance.

    If you have a moment, we’d really appreciate your review on WordPress.org or Trustpilot. Your feedback helps us improve and support more users like you.

    Best regards,
    Carolina

    Thread Starter Imagecsdsubscriber

    (@csdsubscriber)

    Done! Thanks again! 🙂

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

You must be logged in to reply to this topic.