Problem:
The issue here is that the user wanted to encode their URL on the frontend.
Solution:
This can be done by using the following custom shortcode.
// Add Shortcode function wpc_encode_url( $atts ) { // Attributes $atts = shortcode_atts( array( 'url' => '', ), $atts ); return urlencode($atts['url']); } add_shortcode( 'wpc_encode_url', 'wpc_encode_url' );
Then be triggered like below.
[wpc_encode_url url='[types field="url-produit" output="raw"][/types]']
Add the function to your Toolset custom code settings at Toolset -> Settings -> Custom Code.
This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.
Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
- | 9:00 – 12:00 | 9:00 – 12:00 | 9:00 – 12:00 | 9:00 – 12:00 | 9:00 – 12:00 | - |
- | 13:00 – 18:00 | 13:00 – 18:00 | 13:00 – 18:00 | 14:00 – 18:00 | 13:00 – 18:00 | - |
Supporter timezone: America/Jamaica (GMT-05:00)
This topic contains 4 replies, has 2 voices.
Last updated by 3 years, 3 months ago.
Assisted by: Shane.