Support » Plugin: Visual Link Preview » Executing the preview before saving the post

  • sanfisa

    (@sanfisa)


    I would like to use the plugin in the following way.

    I have created a form for users in which there is a field to enter a URL.
    The user can simply fill in the field with an URL address.

    I would like that when the post is saved, the code to view the URL is executed so that when viewing the post, the preview of the URL is displayed. (as if it was created via the WordPress Editor)

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Brecht

    (@brechtvds)

    It’s possible to manually construct the shortcode:
    https://help.bootstrapped.ventures/article/262-manually-construct-the-vlp-shortcode

    But that won’t automatically retrieve the title, image, description, at the moment. That’s on the idea list.

    Thread Starter sanfisa

    (@sanfisa)

    Thank you for your answer. I have another question though, I’ve tried to launch the shortcode with
    do_shortcode( ‘[visual-link-preview encoded=”https://bootstrapped.ventures”%5D’ )

    I cannot get any result, any idea?

    Plugin Author Brecht

    (@brechtvds)

    Please make sure to read through that documentation again. The correct way to link to an external site would be like this: [visual-link-preview type="external" url="https://bootstrapped.ventures"]

    BUT only using that will not do anything right now as the plugin does NOT automatically retrieve the title, image or description at the moment. So you’d need to add one of these attributes as well:

    title="Title for the link preview"
    summary="Summary for the link preview"
    template="specific-template-slug"
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Executing the preview before saving the post’ is closed to new replies.