• Sam Bull

    (@dreamsorcerer)


    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:
    http://sambull.org/downloads/warnings.txt

    The patch for fixing most of these is:
    http://sambull.org/downloads/penscratch.patch

    Should 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:
    http://sambull.org/downloads/penscratch-contrast.patch

    Every 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;
    }

Viewing 7 replies - 1 through 7 (of 7 total)
  • Hi @dreamsorcerer!

    Thanks for sharing your alterations! I love that you’ve addressed the issues you were facing and shared them where others can benefit 🙂

    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.!

    There is actually a way to do this, using the WordPress.com version of the theme (which has been updated to Penscratch 2)

    If you install that theme (download link at the bottom of this page), and install the Jetpack Plugin you’ll find a Content Options panel in the Customizer.

    One of the options allows you to toggle between content and excerpts 🙂

    There are a few other tweaks with that version of the theme as well, like indicators on menus items that have dropdowns, as well as some footer widgets!

    Thread Starter Sam Bull

    (@dreamsorcerer)

    Is there a reason it’s not available in the normal WordPress repository? I didn’t know it existed. Also, all I see is:

    Login to WordPress.com to download Penscratch 2 for your self-hosted WordPress site.

    While I am logged in to the site.

    Is there a reason it’s not available in the normal WordPress repository? I didn’t know it existed. Also, all I see is:

    I’m not sure which way you mean, so I’ll answer both ways:

    Penscratch 2 isn’t in the repo because it’s so very similar to Penscratch itself – they’re nearly identical apart from a few enhanced/added features.

    The Content Options aren’t automatically available because they’re a WordPress.com feature – they’re built into the WordPress.com experience, but Jetpack adds the option for any theme to use them (provided the theme is built to support them, of course).

    Login to WordPress.com to download Penscratch 2 for your self-hosted WordPress site.

    What is the address showing in the address bar of the page where you see that message?

    Thread Starter Sam Bull

    (@dreamsorcerer)

    Try using this link (the difference in the URL is the word theme instead of themes). This is the newer theme showcase, and you shouldn’t need to log in to download the theme!

    https://wordpress.com/theme/penscratch-2

    Thread Starter Sam Bull

    (@dreamsorcerer)

    That page just shows:

    You don’t have any WordPress sites yet.

    It sounds like you’ve logged in to a WordPress.com account (in which case the log in requirement on the older theme showcase shouldn’t get in the way).

    Try signing out. Your avatar (maybe just a default gray icon) will be in the top right. Click that, then use the Sign Out button.

    Once logged out, you should be able to see the theme page I’ve linked to to download the theme (use the download button near the bottom).

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Cleaning up errors/warnings’ is closed to new replies.