How to create a snippet

Estimated reading: 1 minute 280 views
  • Enter the snippet title
  • Then click the Save Changes button.

Note: Do not enter any special characters [!@#$%^&*_(=+-)] into the title.

  • Right below the snippet title field, you can see the REST API URI.
  • That will look like this:
    • https://mywebsite.com/wp-json/post-snippets/my-snippet/{token}/{snippet-title}/{vars}/{shortcode}/{php}/{wptexturize}/snippet?snippet_code={snippet-code}&description={snippet-description}
  • Use the following URI parameters to create a snippet
    • {token} : 6fB9Ied3Tt8BbLyy
    • {snippet-title} : sample-snippet 
    • {vars}: use 0 for empty or enter comma separated values e.g: bobrobden
    • {shortcode}: 1 for enable or 0 for disable/empty 
    • {php}: 1 or 0
    • {wptexturize}: 1 or 0 
    • {snippet-code}: write simple/plain text, HTMLPHP etc.
    • {snippet-description}: lorem ipsum is simply dummy text
  • Snippet successfully created

Leave a Reply

Your email address will not be published. Required fields are marked *

Share this Doc

How to create a snippet

Or copy link

CONTENTS
Scroll to Top