It seems you added the PHP code in the
style.css file. It should be in your
functions.php file. The CSS file is for styles only.
Don’t forget to add the php start tag. There should be a
<?php on the first line of the file.
Once you run this code, there will be some debug info in your log file. These will help us determine where the problem is.