Cleaning up errors/warnings
-
I’ve been running my website through a series of validators/checkers, and have made a number of little changes to this theme in order to clean up all the errors and warnings I’ve found.
If you’re interested in incorporating these changes into the theme, I’ve made a patch for the changes I’ve made.
First, a summary of some of the warnings found, can be viewed at:
https://sambull.org/downloads/warnings.txtThe patch for fixing most of these is:
https://sambull.org/downloads/penscratch.patchShould be able to apply this with:
patch -p1 < penscratch.patch
Additionally, this second patch tweaks the colour scheme slightly to fix warnings about low contrast, allowing a site to achieve level AA accessibility:
https://sambull.org/downloads/penscratch-contrast.patchEvery change should be fixing some kind of error/warning, so do ask any questions if you don’t see why I’ve changed something.
Finally, some additional changes that I’ve made, which would be nice to see in the theme:
In content.php I’ve changed it from showing the full post to only showing the excerpt in the loop. It would be nice to have a option to configure this behaviour.
I added a search field to the end of the navigation menu, like this:
function add_search_to_menu($nav) { return $nav . get_search_form(false); } add_filter('wp_nav_menu', 'add_search_to_menu');
I also added a little fade in animation for the menu (on smaller screens) with this bit of CSS:
@keyframes fadeIn {
from { opacity: 0; }
to { opacity: 1; }
}.main-navigation ul {
animation: fadeIn 1s;
}
- The topic ‘Cleaning up errors/warnings’ is closed to new replies.