How to remove a hook written with $this?

$this refers to the class “WeDevs_Dokan” most likely. Replace: remove_action( ‘dokan_new_product_after_product_tags’, array( $this, ‘add_product_brand_field’ ) ); With: remove_action( ‘dokan_new_product_after_product_tags’, array( ‘WeDevs_Dokan’, ‘add_product_brand_field’ ) ); And see if that works. Sometimes classes are namespaced, so check the file to see if that’s the case and include that before the WeDev_Dokan string.

WP hook to add custom content after the_title()

You need to introduce your own hook (that’s how I’d do it). I’ve added a custom hook in the following snippet: <header class=”entry-header alignwide”> <?php the_title( ‘<h1 class=”entry-title”>’, ‘</h1>’ ); ?> <?php do_action(‘custom_after_title_hook’); ?> <?php twenty_twenty_one_post_thumbnail(); ?> </header> In order for this to work, you need to have: Access to the header.php OR overwrite it … Read more

What is the hook to remove a menu items group from Appearance > Menus column Add menu items

You can use the register_post_type_args filter and just set the show_in_nav_menus argument to false. E.g. add_filter( ‘register_post_type_args’, ‘my_register_post_type_args’, 10, 2 ); function my_register_post_type_args( $args, $post_type ) { if ( ‘post’ === $post_type ) { // or use below to check against two or more post types // if ( in_array( $post_type, array( ‘post’, ‘cpt_1’, ‘cpt_2’, … Read more