Remove Category description textarea

/*remove term descriptions from post editor */ function wpse_hide_cat_descr() { ?> <style type=”text/css”> .term-description-wrap { display: none; } </style> <?php } add_action( ‘admin_head-term.php’, ‘wpse_hide_cat_descr’ ); add_action( ‘admin_head-edit-tags.php’, ‘wpse_hide_cat_descr’ ); If you need to target it to category editor only – in other words leave description for other taxonomies, then easiest will be to position the … Read more

Extend WP Customizer to make multiple image selection possible

What I eventually did was extending the WP_Customize_Control class as follows: <?php if (!class_exists(‘WP_Customize_Image_Control’)) { return null; } class Multi_Image_Custom_Control extends WP_Customize_Control { public function enqueue() { wp_enqueue_style(‘multi-image-style’, get_template_directory_uri().’/css/multi-image.css’); wp_enqueue_script(‘multi-image-script’, get_template_directory_uri().’/js/multi-image.js’, array( ‘jquery’ ), rand(), true); } public function render_content() { ?> <label> <span class=”customize-control-title”>Image</span> </label> <div> <ul class=”images”></ul> </div> <div class=”actions”> <a class=”button-secondary upload”>Add</a> … Read more

Add new “Insert Into Post” button with another function

There’s a get_image_send_to_editor() function in wp-admin/includes/media.php that runs this: apply_filters( ‘image_send_to_editor’, $html, $id, $caption, $title, $align, $url, $size, $alt );. Try hooking that filter. Edit: Help with the filter call… Your call to hook the callback would look like this: add_filter(‘image_send_to_editor’, array(&$MyClassReference, ‘filter_iste’), 10, 8); The 10 is the priority, you might need to adjust … Read more

Save Custom Fields for Variations Product

Okay, based on answers on link above (where I got the old code and there are people that help to answered), I put the modification code for my website. I tried it and it’s working like charm. Change: add_action( ‘woocommerce_product_after_variable_attributes’, ‘variable_fields’, 10, 2 ); Into : add_action( ‘woocommerce_variation_options’, ‘variable_fields’, 10, 3 ); And change : … Read more

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