I did a small adjustment in the 'custom css' in my theme settings, and now I broke my theme. Whenever I select a page as the home page, it says 'Nothing found'. Whenever I visit a page thats not a home page, it works perfectly fine.
Been looking for hours now. Any help appreciated.
Edit: The change in the CSS I made was temporary putting a piece of CSS within a comment (/* foo */) for testing purposes.
I did a small adjustment in the 'custom css' in my theme settings, and now I broke my theme. Whenever I select a page as the home page, it says 'Nothing found'. Whenever I visit a page thats not a home page, it works perfectly fine.
Been looking for hours now. Any help appreciated.
Edit: The change in the CSS I made was temporary putting a piece of CSS within a comment (/* foo */) for testing purposes.
I agree with the comment of @the_hobbes about your code block inadvertently commenting out part of the theme's code. If removing that part of the code doesn't fix the issue, you can try reinstalling the WordPress theme. It will enable the homepage to display with the default CSS codes. Follow these steps:
Now, you should be able to get access to your homepage.
Offhand, it would seem commenting out the custom CSS ought to work. But it's not surprising that it doesn't. So, yes, reinstalling to theme or modifying the database are reasonable things to try in getting the site home page to work again. It's probably not worth trying to figure precisely what's going on, unless simple recovery methods fail.
I can't resist answering the question of what do instead to experiment with a theme's CSS. At least two possibilities:
- for very momentary experiments, use Chrome's Developer Tools. (Firefox has similar tools, but I don't know that Internet Explorer or Edge do.)
- for somewhat less momentary experiments, use a child theme. In it, you can have an ordinary style.css
file, in which you can comment-out parts as usual, or keep multiple versions on hand, or use git, etc.