I have created a new theme and wanted the theme name to be shown in the footer of every page.
I used <?php echo $themename; ?>, but it doesn't output anything. This worked in older versions of WordPress. Am I doing something wrong?
I have created a new theme and wanted the theme name to be shown in the footer of every page.
I used <?php echo $themename; ?>, but it doesn't output anything. This worked in older versions of WordPress. Am I doing something wrong?
<?php printf( __('Powered by the %1$s Theme %2$s'), '<a href="' . $my_theme_data['URI'] . '">' . get_current_theme(), '</a>');?>
Thank you so much. The name shows now.
However, it outputs the current URL instead of the theme URL I specified in style.css ...is that normal or am I supposed to specify the theme name somewhere else as well?
I apologise if I'm being dumb.
My bad. I missed out the first line in the paste:
<?php $my_theme_data = get_theme_data(get_stylesheet_directory() . '/style.css');?>I almost thought I was slightly challenged, since I managed to build an entire theme without any problems and now this happened.
Thanks for the snippet and have a wonderful week. :)
Glad I could help :-)
This topic has been closed to new replies.