Yes, line 152 improperly registers the CSS, so changing that will remove the dark.css theme from the dashboard.
Be careful you don’t overwrite any other theme changes.
You only need to replace the functions.php file by the sound of it.
Aaron
excellent, so to be clear.
Im downloading the gamepress theme and replacing my functions file with the newer one.
then im changing the line of code you specified earlier.
Just want to double check as the newer function file looks like alot more text than my original one.
Will my settngs all be safe if I follow these outlines?
thanks again
Jim
Hmm, maybe there is a newer version of the theme available. Let’s take another look first.
Are you still receiving the error at line 144?
Is this what you’re seeing for lines 140 – 152?
if ( ! function_exists( 'gamepress_enqueue_skin_css' ) ) {
function gamepress_enqueue_skin_css() {
wp_register_style('dark_stylesheet', get_template_directory_uri() . '/css/dark.css');
wp_enqueue_style('dark_stylesheet');
if(of_get_option('gamepress_color_scheme') && of_get_option('gamepress_color_scheme') != 'red') {
wp_register_style('color_scheme', get_template_directory_uri() . '/images/' . of_get_option('gamepress_color_scheme','red') . '/style.css');
wp_enqueue_style('color_scheme');
}
}
}
add_action('wp_print_styles', 'gamepress_enqueue_skin_css');
yes I am, I suspect the whole “I see more text” is just ecause of the way its laid out in notepad?
cheers
Jim
Yes that could be the case. Just compare the file sizes, if they’re the same then you should be fine to proceed.
Remember to keep a backup!
Aaron… is there another medium where i can contact u?
right so ive put the new file in and changed the line of code.
Now I get this when I hit update
Fatal error: Call to undefined function wp_unslash() in /websites/123reg/LinuxPackage22/ge/rt/lu/gertlushgaming.co.uk/public_html/home/wp-admin/theme-editor.php on line 81
rkallon, either start a new thread (I’ll keep an eye out for it), or via aaron @ impression.co.uk
Have you upgraded recently?
That function should be in the core WP install..
Here’s the function declaration – put it in your functions.php file just for now, then once you’re sorted, upgrade wordpress and remove this function declaration again.
function wp_unslash( $value ) {
return stripslashes_deep( $value );
}
I havent upgraded WP recently. Im trying to get 3.6 but it wont update.
Do I put that file anywhere in the functions.php file? Cos if so I have done that and I still get the error.
I hope its not me being a noob and im doing this in the wrong folder. Im doing in
theme functions (function.php)
@retrogam3r
Let’s take stock of where you are right now.
Can you list what you’ve done, and what you’re seeing as of now?
And anything you’ve tried since we’ve been discussing this thread?
Some of your default WP functionality seems to have gone missing, which isn’t the result of editing a theme functions.php file, so we need to see what WP version you’re running too.
Ok so here goes, Il list it so it doesnt hurt or eyes too much:
-I am using WordPress 3.5.2.
-First I was getting a horrible half screen black background on my dashboard and all the text was fuzzy and blurry.
-I deactivated all plugins and it went away so I reactivated each one until the issue came back. I had to do this via FTP as I got a seperate (different each time) error when deactivating from the dashboard.
-I found out it was next gen gallery plugin so I deleted it via FTP.
-I then went to post and I get another fatal error message, again with a different line number at the end. I tried to save my work ana again you guessed it, a fatal error with a different error message.
-I turned off all plugins and used the twenty eleven theme and still the same error messages at the same point.
-I tried t update to 3.6 and got I get
Fatal error: Call to undefined function wp_safe_remote_get() in /websites/123reg/LinuxPackage22/ge/rt/lu/gertlushgaming.co.uk/public_html/home/wp-admin/includes/file.php on line 500
-I tried a manual update of the WP update and it didnt work, I suspect I did something wrong. So I reloaded my backup onto WP via FTP again.
-I then went through everything you have supplied today.
So as it stands I still CANNOT:
save work
post
edit theme settings
activate/deactivate plugins either one by one or by group.(by group sometimes works after the error and reload the page)
oh and I cant update any plugins or themes that are awaiting updates, only a theme atm
Thanks, that helps understand where we’re at.
Basically it sounds like your manual install (or something else) may have removed or damaged a core wordpress file, that’s why you’re missing all of these functions.
Cross reference my instructions with the official guidelines; here.
I propose we follow the following steps;
– Take a backup of the database via MySQL workbench (and confirm the backup works!!)
– Backup /wp-content/ directory via FTP
– Backup /uploads/ directory via FTP
– Backup your wp-config.php file
– Remove everything
– Reinstall WordPress
– Restore wp-config.php file
– Restore your theme folder
– Restore your uploads
– At this point your database should be untouched, and you’re likely to be able to still log in, and all the function files will be there as required.
– Post an update when you get this far.
Drop me an email [email address moderated – these forums do not provide support via email] if you need additional help beyond the scope of this forum