Home>Support>Using the widget field ‘link’

Using the widget field ‘link’

I have some widgets using the function ‘link’
https://siteorigin.com/docs/widgets-bundle/form-building/form-fields/#heading-link

If I enter a url, there’s nothing special here. But, if i select a post i get a string like

post: 123
. Is there a built in function i can use here? In my widget class i have my own function get_link() which checks “does it start with ‘post’, then explode() and return get_permalink([the id])”;

I bet I’ve just missed something here, but I can’t find any info about what to do with this string. Maybe there’s a function/filter i can use?

This is our free support forum. Replies can take several days. If you need fast email support, please purchase a SiteOrigin Premium license.

  1. 5 years, 11 months ago Alex S
    Hi, I Work Here

    Hi Linuzitac,

    Yes, there’s a built in function for this called sow_esc_url to handle the links.

Replies on this thread are closed. Please create a new thread if you have a question, or purchase a SiteOrigin Premium license if you need one-on-one email support.

Get The Most Out of SiteOrigin with SiteOrigin Premium

Find Out More