Removing Image Sizes for Custom Post Type

May be this filter should work intermediate_image_sizes Note: This solution will work if you are uploading an image from post edit screen. (tested on localhost with WP-3.8.1) add_filter( ‘intermediate_image_sizes’, ‘ravs_slider_image_sizes’, 999 ); function ravs_slider_image_sizes( $image_sizes ){ // size for slider $slider_image_sizes = array( ‘your_image_size_1’, ‘your_image_size_2’ ); // for ex: $slider_image_sizes = array( ‘thumbnail’, ‘medium’ ); … Read more

How-to inspect filter-able $vars?

Example Nav menu walker – allows adding eg. css classes to (all) menu items. // copyied from /wp-core/wp-includes/nav-menu-template.php > line 76 (wp 3.1.1) – start_el() function $class_names = join( ‘ ‘, apply_filters( ‘nav_menu_css_class’, array_filter( $classes ), $item, $args ) ); Now let’s check the $var: function wpse15319_check_nav_menu_classes( $classes ) { // You can take any … Read more

How To Customize Position of »add to cart« of WooCommerce on Product Page [closed]

You can do what you want by hooking into the woocommerce_single_product_summary action. The action is executed inside content-single-product.php like this: <?php /** * woocommerce_single_product_summary hook * * @hooked woocommerce_template_single_title – 5 * @hooked woocommerce_template_single_price – 10 * @hooked woocommerce_template_single_excerpt – 20 * @hooked woocommerce_template_single_add_to_cart – 30 * @hooked woocommerce_template_single_meta – 40 * @hooked woocommerce_template_single_sharing – … Read more

Add comments meta fields to comments metabox on post edit screen

Unfortunately the hooks: manage_{$this->screen->id}_columns manage_{$this->screen->id}_sortable_columns manage_comments_custom_column are not available for the post-comments list table, constructed within the wp_ajax_get-comments call. That table consists only of two columns: author and comment. The data for author, avatar, email, url and IP is displayed in the first column. We can on the other hand use a hack like: add_filter( … Read more

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