Replace existing content from specific WooCommerce admin orders list column

The correct filter hook to be used is manage_edit-shop_order_columns. 1) To remove shipping_address column: add_filter( ‘manage_edit-shop_order_columns’, ‘remove_specific_orders_column’ ); function remove_specific_orders_column( $columns ){ unset( $columns[‘shipping_address’] ); return $new_columns; } Code goes in functions.php file of the active child theme (or active theme). Tested and works. 2) Replace the content of shipping_address column: Here is an example … Read more

Sensei LMS Hooks to Remove Content

Just add below code in functions.php for remove action. add_action( ‘init’, ‘remove_hooks’, 11 ); function remove_hooks(){ remove_action(‘sensei_single_course_content_inside_before’,array(‘Sensei_Course’,’the_course_video’),40); } i have tested this and it is working for me. let me know if this works for you.

Customize “the_posts_pagination” and put list instead div

Making your Custom Pagination design In Demo According Your Need . below function Replace Your Function: function wp_custom_pagination($args = [], $class=”pagination”) { if ($GLOBALS[‘wp_query’]->max_num_pages <= 1) return; $args = wp_parse_args( $args, [ ‘mid_size’ => 2, ‘prev_next’ => false, ‘prev_text’ => __(‘Previous’, ‘textdomain’), ‘next_text’ => __(‘Next’, ‘textdomain’), ‘screen_reader_text’ => __(‘Posts navigation’, ‘textdomain’), ]); $links = paginate_links($args); … Read more

Is $hook a global variable in WordPress

Ok – so, firstly you should know that it is a variable and not a function – in php this is indicated by the dollar symbol before the name: $variable as opposed to function() Second, you should note that $hook is passed as a parameter to the function block – like so: function_name( $hook ){ … Read more

Add custom URLs to WordPress’s XML sitemap

Sitemap Provider It’s possible to create a so called custom sitemap provider and register it with wp_register_sitemap_provider(). It’s helpful to look at the core setup, e.g. for the WP_Sitemaps_Posts provider and also the dev notes. Basic Example – Sitemap with custom URLs Here’s a very basic example that adds the wpse provider that extends WP_Sitemaps_Provider, … Read more

Schedule cron event from widget

wp_schedule_event takes a hook as parameter, not a function. Try: wp_schedule_event(time(), ‘daily’, ‘my_daily_event’); add_action(‘my_daily_event’, array(&$this, ‘my_widget_cron’)); if ( !wp_next_scheduled( ‘my_daily_event’ ) ) { wp_schedule_event(time(), ‘hourly’, ‘my_daily_event’) } If you remove the widget from the sidebar, the cron will still continue to run. You can run the following code (outside of the widget class) to clear … Read more

Adding custom text in items titles from wp_nav_menu()

The following works, but with the following caveats. It will run for every menu, but it will not run for wp_page_menu, a usuall default callback if a menu can’t be found. Finally, menu items aren’t necessary pages – so you may want to do some logic to check that the menu item you are dealing … Read more

woocommerce product attributes

A look at the documentation or the source is always helpful. I guess, the correct file to refer to would have been product-attributes.php. For getting the product attributes this is available: get_attribute() ; to list them list_attributes() can be used, which makes use of the product-attributes.php template. You can use those and then hook into … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)