Skip to content
Knowledge Base
Search in

Custom code your link template

Need more than the template styling settings and Link Template Editor? It’s also possible to code your own visual link template.

You will need to create the following directory structure in your (child) theme:

/vlp-templates/link/your-custom-template/

Inside that folder, create the following files:

  • your-custom-template.php
  • your-custom-template.css

These will automatically get loaded when the template is used. your-custom-template can be any name you want. Just make sure the file names match with the directory name.

Inside the PHP file you’ll automatically have the $link variable available to access the different properties.

Have a look at the default templates in the following plugin folder for example usage:

/visual-link-preview/templates/link/