Custom HTML tags

The custom HTML tags provide a great way to expand the current functionality by creating your own php scripts to be executed and the content they output to be shown precisely in a selected position by the administrator.

This can be for example a php script calendar_tag.php  showing a custom calendar, which needs to be added at the top right corner of all pages of the website.  Creating  a new custom tag is simple - the first step is to upload  the corresponding PHP file in the /extensions folder on your site.  Please note the file names of php  files, which will be used for tags should end with tag in their name – for example calendar_tag.php  or news_tag.php etc.  Then from the Extensions → Tags page in the administrator  panel, fill the tag name (for example: calendar) and click on the Add button. This will create the tag - <site calendar/>  in this example and it will appear on the Tags page.



The tag should be defined from Extension →Tags and then inserted in the template or in the page content. When the page is rendered all the custom defined tags will be replaced by the content generated by the script you set.

The Tags page shows the current tags with their name, html code, the file to be executed (with a drop down listing all the uploaded tag files in the /extensions folder and a small delete icon allowing to delete the tag).  The final step when creating a new tag is to associate your tag with the php file you uploaded – this can be done by simply selecting the file from the File dropdown (“calendar_tag.php” in this example) and click on the Save button at the bottom of the page.



After doing this, you can start using the tag by inserting it in the front site template (from Templates → Modify page) at the position you prefer in the template.

 

Was this answer helpful?

 Print this Article

Also Read

Texts & Words

Using this page, you can manage the texts and words showing up on the website or with other...

News

The page makes possible for the administrator to post news on the website, edit or delete any of...

Pages

This is the main page to be used to manage the website structure and content – add new pages,...

Structure management, Adding New Pages

Changing the front site pages meta title and descriptionIn order to change the front site pages...

Modifying the Content of the Pages

The content of the pages can be modified from the Website->Management page in the admin panel....

Powered by WHMCompleteSolution