php – How do I modify the custom footer text and get theme version number to show in wordpress admin?
Question
I am trying to modify the footer text inside the wordpress admin and also get my custom themes version number to show as well but my function is not working properly, I am still very green at PHP
~ Thank-you in advance!
function modify_admin_footer() {
echo '<span id="footer-thankyou">Developed by <a href="http://www.toolcart.com" target="_blank" rel="noopener noreferrer">Toolcart Theme Version:</a>.</span>';
wp_get_theme()->parent()->Version;
}
add_filter( 'admin_footer_text', 'modify_admin_footer' );
in progress
0
10 months
2021-10-06T15:49:17-05:00
2021-10-06T15:49:17-05:00 0 Answer
0 views
0
Answer ( 1 )
Try returning your span instead of echoing it.
function modify_admin_footer() { return '<span id="footer-thankyou">Developed by <a href="http://www.toolcart.com" target="_blank" rel="noopener noreferrer">Toolcart Theme Version:</a>.</span>' . wp_get_theme()->parent()->Version; } add_filter( 'admin_footer_text', 'modify_admin_footer' );