Add ‘Logged-In Admin’ Rule Option to ACF Pro

// 1. Register the rule under the ‘User’ group add_filter(‘acf/location/rule_types’, function($choices) { $choices[‘User’][‘logged_in_admin’] = ‘Logged-In Admin’; return $choices; }); // 2. Limit to only valid operators for dropdown-based values add_filter(‘acf/location/rule_operators/logged_in_admin’, function($choices) { return [ ‘==’ => ‘is equal to’, ‘!=’…Continue reading

Add Product Listing Parameters to Google Product Feed

function lw_woocommerce_gpf_feed_item_google( $feed_item, $product ) { $product_name = $product->get_name(); $label = $product_name . ‘ Shopping Product Card’; $feed_item->purchase_link .= ‘?utm_content=’ . rawurlencode( $label ); return $feed_item; } add_filter( ‘woocommerce_gpf_feed_item_google’, ‘lw_woocommerce_gpf_feed_item_google’, 10, 2 );Continue reading

PRINT WP POST

add_filter(‘the_content’, function($content) { if (!is_single()) return $content; $button = ‘ Print Post ‘; $pos = strpos($content, ‘ ‘); if ($pos !== false) { return substr_replace($content, $button, $pos + 4, 0); } return $button . $content; });Continue reading

DIRSYNC – Lifter Courses

/** * LifterLMS Content Sync Engine – Comprehensive Data Version * Syncs courses and lessons with ALL related content * WPCode Snippet – Run Everywhere – Priority 20 */ defined( ‘ABSPATH’ ) || exit; // Add manual sync button in…Continue reading

ACF – Lifter Course Directory

/** * LifterLMS Content ACF Fields – Comprehensive Version * Registers ACF fields for comprehensive LMS content synchronization * WPCode Snippet – Run Everywhere – Priority 10 */ defined( ‘ABSPATH’ ) || exit; add_action( ‘acf/init’, function () { if (…Continue reading

LIFTER COURSE CPT

/** * LifterLMS Content CPT Registration * Registers custom post type for LifterLMS course content synchronization * WPCode Snippet – Run Everywhere – Priority 0 */ defined( ‘ABSPATH’ ) || exit; add_action( ‘init’, function () { $labels = [ ‘name’…Continue reading

DIR Sync – Member Roles

/** * WordPress Roles Sync – Part 1: Button Only * WPCode Snippet – Run Everywhere – Priority 20 * Start with just this to test if it saves */ defined( ‘ABSPATH’ ) || exit; // Simple admin bar button…Continue reading