I am freaking out, I was trying to confirm something in my account, and then I got this error and now I am totally locked out of doing anything in my blog. I keep getting this error on a white screen: Parse error: syntax error, unexpected '<' in /home/azcubed/public_html/wp-content/themes/happychevron/functions.php on line 2 My page was working fine, and now I can't open anything. I really don't know what to do. This is the code in the PHP file. I am not a coder, so please be specific in telling me what to fix. <?php /** Start the engine */ require_once( get_template_directory() . '/lib/init.php' ); /** Remove the post meta function */ remove_action( 'genesis_after_post_content', 'genesis_post_meta' ); remove_action('genesis_meta', 'genesis_load_favicon'); /** Child theme (do not remove) */ define( 'CHILD_THEME_NAME', 'happychevron' ); define( 'CHILD_THEME_URL', 'http://www.beautifuldawndesigns.net' ); /** Add new image sizes */ add_image_size( 'post-photo', 660, 250, true ); /** Add support for custom background */ add_custom_background(); /** Add support for custom header */ add_theme_support( 'genesis-custom-header', array( 'width' => 1000, 'height' => 300 ) ); /** Unregister secondary navigation menu */ add_theme_support( 'genesis-menus', array( 'primary' => __( 'Primary Navigation Menu', 'genesis' ) ) ); // Customize search add_filter('genesis_search_text', 'happychevron_search_text'); function happychevron_search_text($text) { return esc_attr('Search the site...'); } add_filter('genesis_search_button_text', 'happychevron_search_button_text'); function happychevron_search_button_text($text) { return esc_attr('Search'); } /** Add support for 3-column footer widgets */ add_theme_support( 'genesis-footer-widgets', 3 ); /** Customize the post info function */ add_filter( 'genesis_post_info', 'post_info_filter' ); function post_info_filter( $post_info ) { if ( ! is_page() ) { return 'By [post_author_posts_link] · [post_comments] [post_edit]'; } return $post_info; } /** Customize the post meta function */ add_filter('genesis_post_meta', 'post_meta_filter'); function post_meta_filter($post_meta) { if ( ! is_page() ) { return '[post_categories before="Filed Under: "] · [post_tags before="Tagged: "]'; } return $post_meta; } /** Customize the credits */ add_filter('genesis_footer_creds_text', 'custom_footer_creds_text'); function custom_footer_creds_text($creds) { $creds = 'Copyright © 2012 · Designed by <a href="http://www.beautifuldawndesigns.net" title="Beautiful Dawn Designs">beautiful dawn designs</a>'; return $creds; } /** Add date block before post title */ add_action( 'genesis_before_post_title', 'custom_post_date' ); function custom_post_date() { if ( ! is_page() ) { echo '<div class="post-date">'; echo do_shortcode( '[post_date format="M j, Y"]' ); echo '</div><!-- end .post-date -->'; } } PHP: PLEASE help me!!!
Have you tried removing the blank line at the top of the page? (The <?php starts on line 2 in your example).
You should still be able to access wp admin... change your theme temporarily and contact the theme creators, you paid for it, I'm sure they have a support system/forum.
Some of your add_filter calls are done before the function they are passing is defined, swapping those around might help... but to be honest, I'd half suspect some sort of character encoding error as the cause here... going through, adding actual proper tabbed indents (dunno if the forum stripped them, or the code is just trash), and all the quotes and brackets match up and seem properly closed; and that really leaves some form of oddball character encoding or other bug as the cause.... Is this file called directly, or is it included from something else? no, that wouldn't be it either. What are you using for an editor? Have you switched editors or used many different editors that could have corrupted the character set somehow? (or done something silly like loaded the code in word/wordpad/ooo?) You might also want to clean up some of the unnecessary code bits like the multiple echo doing the job of one and get some proper formatting in there -- though that appears unrelated to your issue. (also, copyright © -- REALLY? It's copyright copyright? )
First of all, it doesn't matter if there is blank space before the <?php opening tag, not that you should do it on purpose. Second of all, there is no space in the file he posted, it just adds up a space when you go to the new line from [c0de]. We really can't tell from what we have here. Some other file is causing this, probably requiring or including the one you posted.
What you've got there is a little problem called the byte order marker (BOM) in UTF-8 (character encoding). This is a problem that's commonly encountered in WordPress, and you can usually fix it by using an FTP client to upload a fresh copy of your theme's functions.php, overwriting the one that's on your server now.