This requires the @wordpress/scripts package but I don’t have the time to get into that now.
WordPress
Fix Redirect Loop After Genesis Upgrade
Add remove_action( ‘genesis_upgrade’, ‘genesis_upgrade_redirect’ ); to functions.php, reload admin without ?page=genesis-upgraded in URL, clear cache, re-save Genesis settings, remove added code.
Nimble Portfolio: Clean up PrettyPhoto URL
Need to remove #nimblebox[nimble_portfolio_gal_default] from your URL? in prettyphoto.js, change (function(j){j(document).on(‘nimble_portfolio_lightbox’,function(event, obj){obj.items.prettyPhoto();})})(jQuery); to (function(j){j(document).on(‘nimble_portfolio_lightbox’,function(event, obj){obj.items.prettyPhoto({deeplinking: false});})})(jQuery);
Custom Walker Nav Menu with Genesis
Slightly different than the vanilla WordPress way… Use a custom walker nav menu to output menu item descriptions in the menu. ( the descriptions can be added after selecting ‘Description’ in Screen Options ) Menu_With_Description is a class that extends Walker_Nav_Menu class. add_filter( ‘wp_nav_menu_args’, function( $args ) { if ( isset( $args[‘menu_class’] ) && ‘menu […]
Require Featured Image
add_action( ‘save_post’, ‘save_post_example’ ); add_action( ‘admin_notices’, ‘admin_notices_example’ ); function save_post_example( $post_id ) { // change to any custom post type if( get_post_type( $post_id ) != ‘post’ ) { return; } if ( ! has_post_thumbnail( $post_id ) ) { // set a transient to show the users an admin message set_transient( ‘has_post_thumbnail’, ‘no’ ); // unhook […]