1. Home
  2. Docs
  3. Insert PHP Code Snippet
  4. User Guide
  5. PHP Code Snippets

PHP Code Snippets

In the PHP Code Snippets section we can see all the available snippets and can create new snippets.

 

php snippets

In this page we can see all the Snippets available, Short code of the snippet, Status of the snippet and we can do some actions here.

The different status are Active and Inactive.

If the snippet is active, you can deactivate it by clicking on the deactivate image in the Action section.

To activate a snippet click on the activate button

You can edit the snippet by clicking on the edit button

To delete the snippet, click on the delete button.

actions

To create a new PHP Code Snippet, please click on the button “Add New PHP Code Snippet

Add PHP Snippet

Here you can enter the Tracking Name and the PHP code (without the starting and ending php tags <?php  ?>).

Now click on the Create button and you will get a short code.

Please copy this short code and paste it in the location where you want to display the content.

When you create a new post or page, you can see the snippet in the editor section as given below.

php snippets

Note: To add the snippet code in templates, please follow the link  Can I embed the PHP Snippet into my template file?

Was this article helpful to you? Yes 5 No 4