How to remove plugin metaboxes from edit.php

You can use the do_meta_boxes hook to remove the metaboxes instead. Like below add_action( ‘do_meta_boxes’, ‘vpm_remove_meta_box’ ); function vpm_remove_meta_box() { remove_meta_box( ‘ortext-metabox’, ‘post’, ‘normal’ ); remove_meta_box( ‘ez-toc’, ‘post’, ‘normal’ ); } See this for more info https://developer.wordpress.org/reference/functions/remove_meta_box/

uninstall.php does not appear to trigger when uninstalling my plugin

I don’t see any issue with the uninstall besides the fact that echo a string(this interpreted us failed) and using hardcode prefix. Below code have been tested locally with the latest version of WordPress. // Access the database via SQL global $wpdb; $wpdb->query( “DELETE FROM {$wpdb->prefix}posts WHERE post_type=”acme_product”” ); $wpdb->query( “DELETE FROM {$wpdb->prefix}postmeta WHERE post_id … Read more

Rewrite rule not matching

I tested the suggestion from my comment and it worked. Remove the brackets from (myaccount) and change $matches[2] in the URL to myaccount: function wpse_287203_rewrite_rule() { add_rewrite_rule( ‘^user/(\d+)/myaccount/?’, ‘index.php?pagename=myaccount&user_id=$matches[1]’, ‘top’ ); } add_action( ‘init’, ‘wpse_287203_rewrite_rule’ ); (myaccount) will not match a whole world. That’s a little more involved. See this Stack Overflow answer for how … Read more

Where these .js file come to source code?

they’re wp_enqueue_script() scripts. You can remove them (if you’re positive nothing uses them) with wp_dequeue_script() similar to the following: add_action( ‘wp_enqueue_scripts’, function() { wp_deregister_script( ‘jquery’ ); wp_deregister_script( ‘wp-embed’ ); }, 99 ); or with add_filter( ‘wp_default_scripts’, function(&$scripts){ if(!is_admin()) { $scripts->remove( ‘jquery’ ); $scripts->remove( ‘wp-embed’ ); } } );

Excerpts on category page

Try this and place in your functions.php file: function custom_excerpt_length( $length ) { return 35; } add_filter( ‘excerpt_length’, ‘custom_excerpt_length’, 999 ); function excerpt_more( $more ) { return sprintf( ‘%2$s’, get_permalink( get_the_ID() ), __( ‘Read More’, ‘textdomain’ ) ); } add_filter( ‘excerpt_more’, ‘excerpt_more’ );