WP 3.6.1 won't read my child theme's functions.php file for Twenty Twelve theme
-
Hi.
I am having a problem. I have posted 2 functions in my functions.php file in my child theme for twenty twelve and it appears that WP is not reading the file. Here is the EXACT code in the functions.php file in my child theme folder:
<?php function _remove_script_version( $src ){ $parts = explode( '?ver', $src ); return $parts[0]; } function my_updated_copyright($first_year, $owner) { $copyright_notice = '© ' . $first_year; $current_year = date('Y'); if($first_year != $current_year) { $copyright_notice .= ' - ' . $current_year; } $copyright_notice .= ' ' . $owner; return $copyright_notice; }
I have tried this code with and without the ending php tag and it doesn’t seem to work.
Here is the code in my footer.php file:
<?php /** * The template for displaying the footer. * * Contains footer content and the closing of the * #main and #page div elements. * * @package WordPress * @subpackage Twenty_Twelve * @since Twenty Twelve 1.0 */ ?> </div><!-- #main .wrapper --> <footer id="colophon" role="contentinfo"> <div class="site-info"> <?php echo my_updated_copyright('2012', 'Mad T.E.A. Productions, inc.'); ?> </div><!-- .site-info --> </footer><!-- #colophon --> </div><!-- #page --> <?php wp_footer(); ?> </body> </html>
In the footer.php file, if I change the code to echo the precise string I want to appear in the footer, it works. But calling on the function “my_updated_copyright” that is stored in the functions.php file does NOT work.
The first function in my functions.php file is supposed to remove the query string/WP version number from static resources on my site. That function is not working either. I have copied these functions directly from the web, found them multiple places where people say these functions work, but they are not working for me no matter what I do.
The site I am working on is bonermovie.com. It is not porn despite the misleading title. It’s the film site for an indie romantic comedy.
Any help would be greatly appreciated. I think I’m doing exactly what I’m supposed to be doing but it’s not working as it seems to be for everyone else making child themes and child functions.php files.
Thanks!
- The topic ‘WP 3.6.1 won't read my child theme's functions.php file for Twenty Twelve theme’ is closed to new replies.