// Shortcode for Current Page URL - Use [geturl] for Shortcode //================================================= add_shortcode ('geturl', 'get_current_page_url'); function get_current_page_url() { $pageURL = 'https://'; $pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"]; return $pageURL; }
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter