Hide Plugin Custom Post Type Menu Link

Those methods that you were using, remove the page totally. If you were the plugin author I would suggest to create the admin page calling add_submenu_page with a parent id of null. Since you can’t change the plugin code the only way to achieve this is using CSS. Read this ticket for more information about … Read more

Can I create a separate admin section for my plugin?

So, As we discussed in comments, the better approach is to do something on Frontend. It adds unnecessary wait to the page, and therefore it isnt viable to have it on backend. If you are building plugin for your own use, then the approach of having backend filters removed on that page could be useful, … Read more

Sharing varible between two add_actions

First of all, the order in which you use add_action is not relevant. The only thing it does is keep a tab of actions to undertake once the hook is encountered. Only when there are several functions on the same hook, the priority of the added action becomes relevant (read more). So, if your global … Read more

Timber: Theme class not fetching the right directory?

@bocaj you’re doing everything right. Unfortunately, we made a tweak to the starter theme which caused some unanticipated errors like the one you’re seeing. If you can simply move the contents of the /theme-name/theme/ folder into /theme-name/ (including style.css, functions.php and others) the problem will resolve itself and links/paths will behave as expected. We tried … Read more

Rewrite/Change custom taxonomy slug

Try using the below code to overwrite arguments of already registered taxonomies. function wp_modify_taxonomy() { // get the arguments of the already-registered taxonomy $custom_category_args = get_taxonomy( ‘genre’ ); // make changes to the args $custom_category_args->rewrite[‘slug’] = ‘chambers’; $custom_category_args->rewrite[‘with_front’] = false; // re-register the taxonomy register_taxonomy( ‘genre’, ‘chambers’, (array) $custom_category_args ); } add_action( ‘init’, ‘wp_modify_taxonomy’, 11 … Read more