Change CPT Edit Target Link for Admin List

Issue-1: edit_post_link() is a template function, to be used in theme template files. It’s not used in the Admin pages. So you’ll not get the edit_post_link filter hook for the Admin list pages. Issue-2: get_edit_post_link() function however, is used in Admin list pages. So you’ll get the get_edit_post_link filter hook for the Admin list pages. … Read more

Is there any filter or action hook to remove layout classes from appearing in my templates?

You may use the following code (either in your active theme’s functions.php file or in a custom plugin): // This line is preferably be added to your theme’s functions.php file // with other add_theme_support() function calls. add_theme_support( ‘disable-layout-styles’ ); // These two lines will probably not be necessary eventually remove_filter( ‘render_block’, ‘wp_render_layout_support_flag’, 10, 2 ); … Read more

delete_term is not working properly with add_action()

AFAIK, slug is unique. So $post_cat_term = get_term_by( ‘slug’, $deleted_term->slug, ‘category’ ); shouldn’t return anything. Instead, you may try name. Also, delete_term callback gets 5 parameters, so it’s better to adjust that accordingly. See if the following works: function delete_similar_term( $term_id, $tt_id, $taxonomy, $deleted_term, $object_ids ) { if( $deleted_term->taxonomy === ‘movies_category’ ) { $post_cat_term = … Read more