Hi Seb,
Glad to hear it has helped you out!
If you’re using the CF7_URL shortcode, it’s defined like this:
function cf7_url(){
$pageURL = 'http';
if( isset( $_SERVER["HTTPS"] ) && $_SERVER["HTTPS"] == "on"){ $pageURL .= "s"; }
$pageURL .= "://";
if( isset( $_SERVER["SERVER_PORT"] ) && $_SERVER["SERVER_PORT"] != "80" ){
$pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
} else {
$pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
}
return $pageURL;
}
add_shortcode('CF7_URL', 'cf7_url');
So you could use that as a base, change the function name and shortcode name, and then remove the if statement about the server port. So something like this (untested)
function cf7_url(){
$pageURL = 'http';
if( isset( $_SERVER["HTTPS"] ) && $_SERVER["HTTPS"] == "on"){ $pageURL .= "s"; }
$pageURL .= "://";
$pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
return $pageURL;
}
add_shortcode('CF7_seb_URL', 'cf7_seb_url');
then you’d just use the CF7_seb_URL
as your shortcode.
Hope that helps!