// Menu Toggle function toggleMenu() { const mobileNav = document.querySelector(‘.mobile-nav’); mobileNav.classList.toggle(‘active’); } // Close Menu on Scroll function closeMenuOnScroll() { const mobileNav = document.querySelector(‘.mobile-nav’); if (mobileNav.classList.contains(‘active’)) { mobileNav.classList.remove(‘active’); } } // Attach the scroll event listener window.addEventListener(‘scroll’, closeMenuOnScroll); // Show…Continue reading
/* General Styles */ body { margin: 0; font-family: ‘Arial’, sans-serif; background-color: #f9f9f9; color: #333; line-height: 1.6; } /* Header Styles */ .header { background-color: #ffe4e1; text-align: center; padding: 20px 10px; box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); }…Continue reading
add_filter( ‘tasty_recipes_smooth_scroll’, ‘__return_false’ );Continue reading
/** * Hide Next button on page 2 by default and show it once an option in a field (e.g. Multiple Choice) is selected. */ // Add CSS to hide the Next button on page 2. add_action( ‘wp_head’, function ()…Continue reading
add_shortcode( ‘mepr-display-total-downloads’, function() { global $wpdb; $downloads_old = $wpdb->get_var( “SELECT SUM(download_count) FROM {$wpdb->prefix}mpdl_file_downloads” ); $downloads_new = $wpdb->get_var( “SELECT count(*) FROM {$wpdb->prefix}mpdl_file_stats” ); $downloads_old = isset( $downloads_old ) && $downloads_old != null ? $downloads_old : 0; $downloads_new = isset( $downloads_new )…Continue reading
add_action( ‘mpca-sub-accounts-th’, function( $curr_user, $sub_accounts ) { ?>Continue reading
add_filter( ‘mepr-admin-subscriptions-cols’, function( $cols ) { $cols[‘col_address’] = __( ‘Address’, ‘memberpress’ ); return $cols; }); add_action( ‘mepr-admin-subscriptions-cell’, function( $column_name, $rec, $table, $attributes ) { if( $column_name === ‘col_address’ ) { $user = new MeprUser( ( int ) $rec->user_id ); $address_one…Continue reading