add_query_arg not work in admin

some_body needs to be run as an action on pre_get_posts. Here’s an example of the entire process of adding new query vars. Pay extra attention to myplugin_pre_get_posts: function myplugin_pre_get_posts( $query ) { … $city = get_query_var( ‘city’ ); … } add_action( ‘pre_get_posts’, ‘myplugin_pre_get_posts’, 1 );

Running multiple security plugins

In my opinion, no: using two plugins that cover the same features is a bad idea. Why? It is very likely that both plugins use the same hooks and filters and so on and will result in conflicts (e.g. .htaccess etc.). JetPack is too overloaded with useless stuff, though it is a high temptation to … Read more

How to add a new column with text fields to WooCommerce Cart List?

This requires you to override WooCommerce templates: 1) First read: Template structure & Overriding templates via a theme to understand how you can change some templates copying them to your active theme folder 2) Copy the template templates/cart/cart.php located in your Woocommerce plugin to your active theme in woocommerce/cart/cart.php (so not in a “template” subfoder). … Read more

Access post title from custom meta box on title change

The event listener you have added will only attach to the available .editor-post-title__input elements, and won’t attach to any dynamically added elements. You are better to move the listener to the body as follows: jQuery(‘body’).on(‘keyup’, ‘.editor-post-title__input’, function(event){ console.log(jQuery(this).val()); }); Given the admin area is moving to use more React components, it’s a good habit to … Read more

problem with sql query

Your code should look something like this: $this->table_name=”table_name”; $how_much = $this->wpdb->get_var(“SELECT COUNT(*) FROM $this->table_name”); We don’t need to use the prepare method, since this is not meant for table names, more here And also… as you what are trying to do is going not in a good direction… I don’t what to criticize you or … Read more

Clear out old images, any advice?

I think you have already discovered the problem with a plugin approach. They will look for unlinked media (images not associated with a post) and remove those files. As you have said, you are using custom fields and you may also have uploaded images inside your post content. Sadly the only option I can think … Read more