//Remove Gutenberg Block Library CSS from loading on the frontend function smartwp_remove_wp_block_library_css(){ wp_dequeue_style( ‘wp-block-library’ ); wp_dequeue_style( ‘wp-block-library-theme’ ); } add_action( ‘wp_enqueue_scripts’, ‘smartwp_remove_wp_block_library_css’ );Continue reading
function g9_upcoming_events($atts) { $shortcode_args = shortcode_atts(array( ‘number’ => 3, // Number of events ‘category’ => ”, // Category slug ‘slider’ => false, ), $atts); // Ensure the global $post variable is in scope global $post; // Retrieve the next 3…Continue reading
function g9_remove_price($price) { if (is_shop() || is_product_category()) return; return $price; } add_filter(‘woocommerce_get_price_html’, ‘g9_remove_price’);Continue reading
function g9_add_woocommerce_support() { add_theme_support(‘woocommerce’); } add_action(‘after_setup_theme’, ‘g9_add_woocommerce_support’);Continue reading
if (function_exists(‘acf_add_options_page’)) { acf_add_options_page(array( ‘page_title’ => ‘Theme General Settings’, ‘menu_title’ => ‘Theme Settings’, ‘menu_slug’ => ‘theme-general-settings’, ‘capability’ => ‘edit_posts’, ‘redirect’ => false )); }Continue reading
function g9_remove_schedule_delete() { remove_action(‘wp_scheduled_delete’, ‘wp_scheduled_delete’); } add_action(‘init’, ‘g9_remove_schedule_delete’);Continue reading
function g9_user_role_order_icon($column_name, $post_id) { if ($column_name == ‘order_number’) { $order = wc_get_order($post_id); // Get user id from order $user_id = $order->get_user_id(); if ($user_id > 0) { $user_meta = get_userdata($user_id); $user_roles = $user_meta->roles; // Check if user role my-custom-user-role is in…Continue reading
function g9_change_number_related_products($args) { $args[‘posts_per_page’] = 3; $args[‘columns’] = 3; return $args; } add_filter(‘woocommerce_output_related_products_args’, ‘g9_change_number_related_products’, 9999);Continue reading
// Main content area. add_action( ‘wpforms_entry_details_content’, static function ( $entry, $form_data, $single_entry ) { $hook_name = ‘wpforms_entry_details_content’; remove_action( $hook_name, [ $single_entry, ‘details_fields’ ], 10 ); remove_action( $hook_name, [ $single_entry, ‘details_notes’ ], 10 ); remove_action( $hook_name, [ $single_entry, ‘details_log’ ], 40…Continue reading