Hello i’m trying to insert shortcode inside subfooter text.
It is working fine in visual composer. What i’m doing wrong?
I’m adding this shortcode via plugin using this code:
function rurls_convert_base_domain() {
$string = site_url();
$pattern = ‘(^https\:\/\/|^http\:\/\/)’;
$replacement = ”;
return preg_replace($pattern, $replacement, $string);
}
add_shortcode(‘base_domain’, ‘rurls_convert_base_domain’);
Hi
You don’t need to use shortcodes to achieve the desired result, just add the text in footer copyright text from theme panel and the rezult will be like here: http://screencast.com/t/sxpOUxGlFhr – http://screencast.com/t/ZwO0tdOvBd
Thanks!
Hi
Try this code in functions.php: http://screencast.com/t/0RqeGb7ql
function rurls_convert_base_domain() {
$string = site_url();
$pattern = "(^https\:\/\/|^http\:\/\/)";
$replacement = '';
return preg_replace($pattern, $replacement, $string);
}
add_shortcode('base_domain', 'rurls_convert_base_domain');
You also have to edit footer.php file and add this line here: http://screencast.com/t/j7owEuw6Xq84
Hope this helps.
Thanks!