Using BuddyDev Code Snippets Section

Welcome to the 5 minute guide to getting started with BuddyDev Code Snippts.

You Can see all Code Snipptes by Viewing  :  https://buddydev.com/snippets/ or can click on the codes links as shown below

Viewing the complete snippet:-

Click on the permalink, to view the whole code snippet on Single Page. On Archive page, you can even click on the title to toggle the Code snippet.

Adding Codes(Understand toolbar)

  • Use the + icon to add new Code Snippet
  • Use # icon to see all the tags under which codes are posted
  • use home icon to get back to the code snippet home

Codes can be organized by projects or tags

Preserving Code Format:-

A new code snippet can be a mix of normal text + Codes. When you start a code section in the snippet it must start like this

//starting code block by triple backtick(') followed by language name without space as


//and to end it just put triple code tick back on new line at the end


Example: PHP code can be posted like this


//here goes some php code

//let us close this


Javascript Code can be posted like this


//some js code here


And CSS like this



Some Css rules here



Adding title to the Code:-

Normally you should use the first line as the title of the snippet. The theme we are using allows us to use # [SINGLE SPACE] Title name  to use as title 

For example, if you use following as the first line

# This is an Awesome snippet

The title will be "This is an awesome title" . We  strongly recommend using title with the code. Please note, if you do not use single space after the hash(#), the following text will not be considered as title. Make sure to use space after hash for title

Tagging codes:-

Use #something to tag the code under something, you can separate multiple tags by new line or comma

Tagging code in Projects:-

Use @project-name to tag the code under project name. eg. @bp-gallry