Issue Summary
Want to add a script to functions.php but it fails to save.
Troubleshooting Questions
it happnens to only 1 because this is the first site I try to make it with local
- Are you able to create a new, plain WordPress site in Local and access it in a Browser?
yes
Replication
Open functions.php in the theme editor
Add this code to it :
function exclude_category_home( $query ) {
if ( $query->is_home ) {
$query->set( ‘cat’, ‘-5’ );
}
return $query;
}
and try to save it
System Details
-
Which version of Local is being used?
-
What Operating System (OS) and OS version is being used?
Windows 10 proffesional
- Attach the Local Log. See this Help Doc for instructions on how to do so:
local-lightning.log (16.2 KB)
Security Reminder
Local does a pretty good job of scrubbing private info from the logs and the errors it produces, however there’s always the possibility that something private can come through. Because these are public forums, always review the screenshots you are sharing to make sure there isn’t private info like passwords being displayed.