How to remove categories filter from wordpress admin?

I tested this and it works for removing the categories dropdown on the All Posts page: add_action( ‘load-edit.php’, ‘no_category_dropdown’ ); function no_category_dropdown() { add_filter( ‘wp_dropdown_cats’, ‘__return_false’ ); } — below: old answer when I misunderstood the question — The code you posted works just fine for me. But here’s an alternative you might try: add_filter(“manage_posts_columns”, … Read more

Automatically enable custom theme, plugins and default content on installation?

Sure. wp_install_defaults() is a pluggable function. (As are wp_new_blog_notification() and wp_upgrade(), in case you ever need to override those too.) # in wp-config.php if ( defined(‘WP_INSTALLING’) && WP_INSTALLING ) { include_once dirname(__FILE__) . ‘/wp-content/install.php’; } # in wp-content/install.php function wp_install_defaults($user_id) { global $wpdb, $wp_rewrite, $current_site, $table_prefix; // do whatever you want here… }

WordPress Multiple Category Search

The problem is that in a url the ‘+’ sign is equivalent to a space so that’s how PHP sees it. If you use an action on parse_request you can make this work like so: add_action( ‘parse_request’, ‘category_search_logic’, 11 ); function category_search_logic( $query ) { if ( ! isset( $query->query_vars[ ‘cat’ ] ) ) return … Read more

How to Handle Distributed Development Workflow

Caution: very mac/linux/unix centric thoughts ahead. Includes a lot of command line fu. Put All the Code Under Version Control I like git. Mark Jaquith has some good suggestions on keeping an entire site under version control using git and submodules for the WordPress core. You could also put plugins in as git submodules. The … Read more

How can I hide a category from Contributors in the edit/add new post screen?

Working Example in Oct 2020, Working answer, I went to different answers none of them works now in new WordPress. function hide_categories_for_specific_user( $exclusions, $args ){ if ( ((defined( ‘REST_REQUEST’ ) && REST_REQUEST) or $GLOBALS[‘pagenow’] === ‘edit.php’ ) && !current_user_can( ‘manage_options’ ) ) { // IDs of terms to be excluded $exclude_array = array(“12″,”16″,”17”); // CHANGE … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)