Exam Date Button & Appointment Sync
add_action(‘wp_footer’, function () { ?>Continue reading
Join 2,000,000+ Professionals who use WPCode to Future-Proof Their Websites!
add_action(‘wp_footer’, function () { ?>Continue reading
/** * First Remove The Existing Pricing Filter So That It Will Be Available To All Users */ add_action(‘init’, ‘remove_existing_pricing_html’, 10); function remove_existing_pricing_html() { global $wc_wholesale_prices; remove_filter(‘woocommerce_get_price_html’, [$wc_wholesale_prices->wwp_for_non_wholesale_customer,’add_click_wholesale_price_for_non_wholesale_customers’], 10 ); } /** * Include Pricing HTML for all users */…Continue reading
/** * WPCode Snippet: Display AIOSEO Meta Data for Post ID 323 * */ add_filter(‘the_content’, function($content) { // Only show on single post/page and for post ID 323 if (!is_singular() || get_the_ID() != 323) { return $content; } if (!function_exists(‘aioseo’))…Continue reading
function convert_to_sentence_case($text) { $exceptions = array( ‘API’, ‘URL’, ‘HTML’, ‘CSS’, ‘PHP’, ‘SQL’, ‘XML’, ‘JSON’, ‘HTTP’, ‘HTTPS’, ‘CEO’, ‘CTO’, ‘CFO’, ‘USA’, ‘UK’, ‘EU’, ‘AI’, ‘ML’, ‘IoT’, ‘GPS’, ‘FAQ’, ‘PDF’, ‘SEO’, ‘ROI’, ‘KPI’, ‘B2B’, ‘B2C’, ‘SaaS’, ‘WordPress’, ‘WooCommerce’, ‘jQuery’, ‘JavaScript’, ‘MySQL’, ‘AWS’…Continue reading
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
add_action( ‘frm_entries_footer_scripts’, ‘trigger_sweetalert_for_form_6’, 20, 2 ); function trigger_sweetalert_for_form_6( $fields, $form ) { if ( $form->id == 6 ) { ?>Continue reading
// Compatibilizar FiboSearch Pro com HPOS (WooCommerce) add_action( ‘before_woocommerce_init’, function() { if ( class_exists( AutomatticWooCommerceUtilitiesFeaturesUtil::class ) ) { AutomatticWooCommerceUtilitiesFeaturesUtil::declare_compatibility( ‘custom_order_tables’, ‘ajax-search-for-woocommerce-premium/ajax-search-for-woocommerce.php’, true ); } });Continue reading
function custom_redirect_old_new_urls() { $redirect_urls = array( ‘/oldpage/’ => ‘/newpage/’, ‘/oldpage1/’ => ‘/newpage1/’, // Add more URLs here ); $request_uri = home_url( add_query_arg( array(), $_SERVER[‘REQUEST_URI’] ) ); foreach ( $redirect_urls as $old_url => $new_url ) { if ( untrailingslashit( $request_uri )…Continue reading
// Add Property Analyzer Demo to WordPress function addPropertyAnalyzerDemo() { // Only add on homepage or specific pages if (!is_home() && !is_page(‘home’) && !is_front_page()) return; // CSS Styles echo ‘ ‘; // HTML Structure echo ‘ 🏠 See Our AI…Continue reading
function wpcode_snippet_add_slug_body_class( $classes ) { global $post; if ( isset( $post ) ) { $classes[] = $post->post_type . ‘-‘ . $post->post_name; } return $classes; } add_filter( ‘body_class’, ‘wpcode_snippet_add_slug_body_class’ );Continue reading