Customize Woocommerce Settings Tab

Let’s talk about customizing Woocommerce Admin setting Tabs.To hide a specific Woocommerce setting tab or want to customize the Woocommerce setting tabs, not the entire sub-menu, but just a tab.For just Removing tabs we can use

Cron Job WordPress (WP-Cron)

What Is Wordpress Cron Job? Wordpress Cron Job is how WordPress handles scheduling time-based tasks in WordPress.“Cron” Means the cron time-based task scheduling system which is available on UNIX systems.

Display a Product Category Dropdown and Redirect To Single Category Upon Selection.

How To add category dropdown Before WooCommerce product loop? WooCommerce product loop is generally on shop page and category page. on both pages WooCommerce provide hooks before the loop and after the loop. “woocommerce_before_shop_loop” “woocommerce_after_shop_loop” For adding a category dropdpwn or other texonomy dropdown We will use “woocommerce_before_shop_loop”.   For Both Product loop. (shop page and category page) function CategorySwitcher() { wc_product_dropdown_categories(); $category_base=get_option(‘woocommerce_permalinks’)[‘category_base’]; wc_enqueue_js( ” (‘#product_cat’).change(function () { location.href = ‘”.site_url().’/’.$category_base.”/’ + $(this).val(); }); “); } add_action(‘woocommerce_before_shop_loop’,’CategorySwitcher’,100); For Only Category Archive Page.   function CategorySwitcher() { if ( is_product_category() ) { wc_product_dropdown_categories(); } $category_base=get_option(‘woocommerce_permalinks’)[‘category_base’]; wc_enqueue_js( ” (‘#product_cat’).change(function () { location.href = ‘”.site_url().’/’.$category_base.”/’ + $(this).val(); }); “); } add_action(‘woocommerce_before_shop_loop’,’CategorySwitcher’,100); For Only Shop Page.   function CategorySwitcher() { if ( is_shop() ) { wc_product_dropdown_categories(); } $category_base=get_option(‘woocommerce_permalinks’)[‘category_base’]; wc_enqueue_js( ” (‘#product_cat’).change(function () { location.href = ‘”.site_url().’/’.$category_base.”/’ + $(this).val(); }); “); } add_action(‘woocommerce_before_shop_loop’,’CategorySwitcher’,100);  

Disable Automatic Login After Registration

When we enable customer registration on My Account page, We will know that when new user is register it’s automatically logged in .
it need to change when we need to manually approve each user.

Remove Welcome Panel from WordPress

In WordPress, the “Welcome” panel is a dashboard widget that appears for new users or users who haven’t dismissed it yet. It provides some basic information and links to help users get started with WordPress. If you want to remove the “Welcome” panel from the WordPress dashboard, you can do so using either a plugin or custom code. Option 1: Remove “Welcome” Panel Using a Plugin 1. Install and activate the “Disable Welcome Panel” plugin. You can find this plugin on the WordPress.org plugin repository. 2. Once activated, the “Welcome” panel will no longer be displayed on the WordPress dashboard. Option 2: Remove “Welcome” Panel Using Custom Code If you prefer to remove the “Welcome” panel using custom code, follow these steps: 1. Open your theme’s `functions.php` file or create a custom plugin file. 2. Add the following code to remove the “Welcome” panel:   function custom_remove_welcome_panel() { remove_action(‘welcome_panel’, ‘wp_welcome_panel’);

Add Custom Dashboard Widgets in WordPress.

To add custom dashboard widgets in WordPress, you can use the `wp_add_dashboard_widget` function. This function allows you to create and display custom widgets on the WordPress dashboard. The `wp_add_dashboard_widget` function is used to register and display a custom dashboard widget. It requires three parameters: 1. `$widget_id` (string) – The ID of the widget. This ID must be unique to avoid conflicts with other dashboard widgets. It’s used as a reference for the widget, so make sure to choose a unique and descriptive ID. 2. `$widget_name` (string) – The name or title of the widget. This is the text that will be displayed as the title of the dashboard widget. 3. `$callback` (callable) – The callback function that renders the content of the widget. This function will be responsible for generating the HTML and content to be displayed in the custom dashboard widget. It should accept no arguments as WordPress will

How to add ACF options pages and options sub page

To add Advanced Custom Fields (ACF) options pages and options sub-pages, you’ll need to have ACF Pro installed and activated on your WordPress site. ACF Pro allows you to create custom options pages where you can add settings, fields, and other configuration data.

Change the WooCommerce Breadcrumb Text.

To change the WooCommerce breadcrumb text, you can use the `woocommerce_breadcrumb_defaults` filter hook to modify the default breadcrumb settings. This filter allows you to customize the breadcrumb separator and labels as per your requirement. Here’s how you can change the WooCommerce breadcrumb text: 1. Open your theme’s `functions.php` file or a custom plugin file. 2. Add the following code to customize the breadcrumb text: function custom_change_woocommerce_breadcrumb($args) { // Customize breadcrumb separator (optional) $args[‘delimiter’] = ‘ > ‘; // Customize breadcrumb labels $args[‘home’] = ‘Custom Home’; $args[‘shop’] = ‘Custom Shop’; $args[‘singular_name’] = ‘Custom Item’; return $args; } add_filter(‘woocommerce_breadcrumb_defaults’, ‘custom_change_woocommerce_breadcrumb’); In this code, we use the `woocommerce_breadcrumb_defaults` filter to modify the breadcrumb settings. The `custom_change_woocommerce_breadcrumb` function receives the default breadcrumb settings as `$args`. You can customize the following breadcrumb settings: – `$args[‘delimiter’]`: This sets the separator between breadcrumb items. In the example, we use `’ > ‘` as the separator. You can

Categories