Archived topic
Footer customizer copyright box - dynamic name added. get_site_url or site title
4 replies · Started by Brad on January 26, 2023
Hi. I'm building a Wp Multisite (I'm brand new to Wp Multisite) and trying to find a dynamic solution to the footer copyright area for new subsites.
%copy% %current_year% (I'd like to have name of web site next).
Do you know if php or shortcodes will work in this box? I was thinking maybe trying to use this function somehow to return the name of the url.
https://developer.wordpress.org/reference/functions/get_site_url/
Can you by chance think of a way to achieve this?
Objective:
%copy% %current_year% subdomain(dot)com
Or
%copy% %current_year% subdomain site title
But not this...
%copy% %current_year% https://subdomain(dot)com
Found this. Going to try it now.
<h1><?php echo get_bloginfo( 'name' ); ?></h1>
/**
* [sitename] — Site name shortcode
*/
add_shortcode( 'sitename', function() { return get_bloginfo(); } );
That should do the trick. Let us know :)
Yes. Thanks!
Glad to hear that!