Helper functions to make generating WordPress post type labels and taxonomy labels easier
Generate post type and taxonomy labels easily by specifying the singular and plural version of the…
Translate Products
Code required to translate the word "Products".
Google AdSense code
AdSense code
User Switching
Easily switch to a Customer when using the User Switching plugin
ai content idea generator
function openai_generate_text() { // Get the topic from the AJAX request $prompt = $_POST['prompt']; $prompt ="generate…
Auto register guests that purchase
function wc_register_guests( $order_id ) { // get all the order data $order = new WC_Order($order_id); //get…
Using an Office 365 GCC or DoD email address
For security measures, Government Community Cloud (GCC) and U.S. Department of Defense (DoD) accounts typically use…
Redirect from Array
Setup redirect for multiple pages.
Fixing WPForms Bulk Update Issues with WP Umbrella
This code snippet will force the WPForms updater to run during the WP Umbrella snapshot request.
Google Tag Manager - Head
(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= 'https://www.googletagmanager.com/gtm.js?id=GTM-XXXXXXXXXX'+dl;f.parentNode.insertBefore(j,f); })(window,document,'script','dataLayer','GTM-XXXXXXXXXX');
Paid Memberships Pro with WC Vendors
// PAID MEMBERSHIPS PRO -- UPGRADE TO VENDOR, DOWNGRADE TO SUBSCRIBER /* Members signing up for…
Add custom page to the vendor dashboard
// Hook into the navigation add_filter( 'wcv_pro_dashboard_urls', 'add_test_page_nav', 9 ); function add_test_page_nav( $pages ){ $pages[ 'test_page'…
Google Webmaster SEO Issue | Fix Duplicate without user-selected canonical
This snippet hooks into Rank Math’s rank_math/frontend/robots filter to modify how WordPress handles robots meta tags…
Number slider validation for single page forms
This snippet uses the wpforms_process_validate_number-slider action to check the slider value after submission.