Custom Javascript and Css for Blocks
add_action( ‘admin_footer’, function() { if ( $GLOBALS[‘current_screen’]->base !== ‘post’ ) { return; } ?>Continue reading
Join 2,000,000+ Professionals who use WPCode to Future-Proof Their Websites!
add_action( ‘admin_footer’, function() { if ( $GLOBALS[‘current_screen’]->base !== ‘post’ ) { return; } ?>Continue reading
// // Add custom columns to post and page lists function custom_add_id_columns($columns) { $columns[‘post_id’] = ‘ID’; // For Posts $columns[‘page_id’] = ‘ID’; // For Pages return $columns; } add_filter(‘manage_posts_columns’, ‘custom_add_id_columns’); add_filter(‘manage_pages_columns’, ‘custom_add_id_columns’); // Populate the custom columns with IDs function…Continue reading
add_action( ‘woocommerce_product_meta_end’, ‘wcv_add_brands_single_product’ ); function wcv_add_brands_single_product() { global $product; $taxonomy = ‘wcv_brands’; // The custom taxonomy as defined during our register_taxonomy code above. if( ! taxonomy_exists( $taxonomy ) ){ return; // exit } $term_ids = wp_get_post_terms( $product->get_id(), $taxonomy, array(‘fields’ =>…Continue reading
/** * Add the custom taxonomy to the WC Vendors Pro dashboard. * */ function wcv_add_brands_field( $object_id ){ WCVendors_Pro_Form_helper::select2( array( ‘post_id’ => $object_id, ‘id’ => ‘_wcv_custom_taxonomy_wcv_brands[]’, ‘class’ => ‘select2’, ‘custom_tax’ => true, ‘label’ => __( ‘Brand’, ‘wcvendors-pro’ ), ‘taxonomy’ =>…Continue reading
/** * Add the custom taxonomy to the WC Vendors Pro dashboard. * */ function wcv_add_brands_field( $object_id ){ WCVendors_Pro_Form_helper::select2( array( ‘post_id’ => $object_id, ‘id’ => ‘_wcv_custom_taxonomy_wcv_brands[]’, ‘class’ => ‘select2’, ‘custom_tax’ => true, ‘label’ => __( ‘Brand’, ‘wcvendors-pro’ ), ‘taxonomy’ =>…Continue reading
if ( ! defined( ‘AUTOSAVE_INTERVAL’ ) ) { // Change 5 to the number of minutes you want to use. define( ‘AUTOSAVE_INTERVAL’, 5 * MINUTE_IN_SECONDS ); }Continue reading
add_filter( ‘wp_revisions_to_keep’, function( $limit ) { // Limit to the last 20 revisions. Change 20 to whatever limit you want. return 20; } );Continue reading
add_filter( ‘wcv_product_price’, ‘price_min_max’ ); function price_min_max( $args ) { $args[‘custom_attributes’] = array( ‘min’ => 3, ‘max’ => 200, ‘data-parsley-type’ => ‘number’, ‘data-parsley-range-message’ => __( ‘Price must be between 3 and 200’, ‘wcvendors-pro’ ), ‘pattern’ => ‘\d*’, ); return $args; }Continue reading
upload_max_filesize = 32M post_max_size = 64M memory_limit = 128M ?>Continue reading
upload_max_filesize = 256M post_max_size = 256M max_execution_time = 300 />Continue reading