• Resolved Timo

    (@valmar)


    I followed the instructions to install the snippets plugin and enabled it.

    Then, in the admin area of WP I activated the HTML example snippet:

    add_shortcode( 'shortcode_name', function () {
    
    	$out = '<p>test</p>';
    
    	return $out;
    } );

    If I load my website the snippet is not there.

    Any ideas how to troubleshoot this?

    Thanks so much!

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Shea Bunge

    (@bungeshea)

    Have you inserted the shortcode into a post or page?

    Thread Starter Timo

    (@valmar)

    Oh, I thought it would be automatically injected into the DOM.
    Didn’t know that a snippet must always be part of a page or post.

    Thanks Shea! 🙂

    Plugin Author Shea Bunge

    (@bungeshea)

    When you’re making a shortcode snippet like this, you definitely need to!

    If you’re using an action hook then it’ll be automatically injected.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Snippet not showing up’ is closed to new replies.