events/2021-12-22-hwc-americas

 Homebrew Website Club - The Americas  was an IndieWeb meetup on Zoom held on 2021-12-22.


 * When: 2021-12-22
 * Archived from: https://etherpad.indieweb.org/hwc-2021-12-22

Fixing the TwentyTwenty Theme
Add this to the bottom of inc/template-tags.php

/* * Adds custom classes to the array of body classes. * * @param array $classes Classes for the body element. * @return array */ function mf2_body_classes( $classes ) { // Adds a class of hfeed to non-singular pages. if ( ! is_singular ) { $classes[] = 'hfeed'; $classes[] = 'h-feed'; } else { if ( 'page' !== get_post_type ) { $classes[] = 'hentry'; $classes[] = 'h-entry'; }        }        return $classes; } add_filter( 'body_class', 'mf2_body_classes' );

/** * Adds custom classes to the array of post classes. * * @param array $classes Classes for the body element. * @return array */ function mf2_post_classes( $classes ) { $classes = array_diff( $classes, array( 'hentry' ) ); if ( ! is_singular ) { if ( 'page' !== get_post_type ) { // Adds a class for microformats v2                       $classes[] = 'h-entry'; // add hentry to the same tag as h-entry $classes[] = 'hentry'; }       }        return $classes; }

add_filter( 'post_class', 'mf2_post_classes' );