Fatal error – functions.php
-
Hi everyone! I’m new in wordpress and so far I managed to build up my website (Lionball) without modifying the code by myself (I always used plugins in order to avoid it) since I really have no idea about coding.
However, yesterday I felt brave enough to modify the code for the first time… You can imagine I screwed-up my whole website… I basically thought that copying the following code (found here) and pasting it twice in my functions.php I could add two links in my tagline rather than only one…
add_filter( 'tc_tagline_display' , 'my_link_in_tagline'); function my_link_in_tagline() { global $wp_current_filter; ?> <?php if ( !in_array( '__navbar' , $wp_current_filter ) ) :?> <div class="container outside"> <h2 class="site-description"> <?php bloginfo( 'description' ); ?> <a href="[PUT YOUR URL HERE]" title="[A TITLE]">My link</a> </h2> </div> <?php else : //when hooked on __navbar ?> <h2 class="span7 inside site-description"> <?php bloginfo( 'description' ); ?> <a href="[PUT YOUR URL HERE]" title="[A TITLE]">My link</a> </h2> <?php endif; ?> <?php }
That ended up terribly bad and now the following error appears everywhere, my website doesn’t work at all and I cannot even access to my dashboard:
Fatal error: Cannot redeclare my_link_in_tagline() (previously declared in /home/lionball/public_html/wp-content/themes/customizr/functions.php:63) in /home/lionball/public_html/wp-content/themes/customizr/functions.php on line 104
Any ideas how can I undo that or at least delete that second copy of the code that I added? I’m really sorry for asking this, but I just found myself in this big mess and don’t know how to fix it…
Thank you very much for reading!!
- The topic ‘Fatal error – functions.php’ is closed to new replies.