WooCommerce – Get products from category right before deleting category

The hook delete_term_taxonomy fires before the category is deleted. If you look at the original code: /** * Fires immediately before a term taxonomy ID is deleted. * * @since 2.9.0 * * @param int $tt_id Term taxonomy ID. */ do_action( ‘delete_term_taxonomy’, $tt_id ); $wpdb->delete( $wpdb->term_taxonomy, array( ‘term_taxonomy_id’ => $tt_id ) ); /** * Fires … Read more

Ajax Category add doesn’t update the list table custom column

The code is fully functional and tested. Add this in functions.php and check. I am giving you an example using the checkbox in the add and edit for the category. function mytheme_custom_column( $columns ) { $columns[‘my_column’] = ‘My custom column’; return $columns; } add_filter( ‘manage_edit-category_columns’ , ‘mytheme_custom_column’ ); function mytheme_custom_column_fill( $content, $column_name, $term_id ) { … Read more

displaying one category on one page

If it works with is_home() then I think it is just a problem with your slug. Have you tried to check the is_page by it ID directly? Something like this should return /* * Returns true when the Pages displayed is either post ID 1, * or post_name “top-best”, or post_title “Top Best”. * Note: … Read more