Manually construct the VLP shortcode

When using the UI to construct a VLP link, the shortcode that gets generated uses encoding to prevent issues with special characters. It is however possible to manually construct that shortcode as well, for some advanced use cases.

Here's an example of a shortcode you can put into any post or page to have a VLP link show up:

[visual-link-preview type="external" url="https://bootstrapped.ventures" title="Bootstrapped Ventures" summary="Check out the plugins by this Belgian company!"]

For an external link, you manually set the url attribute like this:

[visual-link-preview type="external" url="https://bootstrapped.ventures" ...

For an internal link, you set the post_id attribute instead:

[visual-link-preview type="internal" post_id="123" ...

The shortcode is required to have 1 of these 2 options in combination with a title and summary. It cannot automatically retrieve the title and summary information at the moment.

For images we recommend having them in your own media library and using the image_id attribute:

[visual-link-preview image_id="234" ...

Alternatively, an external image can be used as well:

[visual-link-preview image_id="-1" image_url="https://link.to/image.jpg" ...

Finally, these other attributes are available for the shortcode:

title="Title for the link preview"
summary="Summary for the link preview"\
template="specific-template-slug"
custom_class="my-custom-class-for-this-link"
nofollow="0"
new_tab="1"
Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.